java - Spring Boot - Slow to start application on different connections -


i'm experiencing weirdness spring boot application.

when i'm connected wifi (my home network) or disconnected internet entirely, application starts within 6 seconds.

when i'm connected wifi b (my work network) application takes 1.5 minutes start.

this simple hello, world! spring application. main class looks this:

import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.springbootapplication;  @springbootapplication public class application {      public static void main(string[] args) {         system.out.println("start := " + system.currenttimemillis());         springapplication.run(application.class, args);         system.out.println("stop := " + system.currenttimemillis());     } } 

i see start timestamp printed @ same speed, must springapplication.run. bare class, there no spring configurations otherwise. why change in wifi connection cause such lag start? i'm running both using mvn spring-boot:run on mac osx

i having similar problem this. simple spring boot app take around 45 seconds start on office network, , under 10 seconds on home network.

it seems there delay identifying external ip address, running following command fixed on mac.

scutil --set hostname "localhost" 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -