Closed
Description
I have my simplest spring app. If I compile with --no-server
I always get the same image and same output. If I try to run with a server, my image changes size across multiple builds and the output from my app changes. Here are two images built in sequence with the server:
Compile with server, first build (69 seconds):
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::
Dec 06, 2019 4:07:41 PM org.springframework.boot.StartupInfoLogger logStarting
INFO: Starting CommandlinerunnerApplication on Andys-MacBook-Pro-2018.local with PID 51764 (/Users/aclement/gits/spring-graal-native/spring-graal-native-samples/commandlinerunner/clr started by aclement in /Users/aclement/gits/spring-graal-native/spring-graal-native-samples/commandlinerunner)
Dec 06, 2019 4:07:41 PM org.springframework.boot.SpringApplication logStartupProfileInfo
INFO: No active profile set, falling back to default profiles: default
Dec 06, 2019 4:07:41 PM org.springframework.boot.StartupInfoLogger logStarted
INFO: Started CommandlinerunnerApplication in 0.041 seconds (JVM running for 0.045)
CLR running!
real 0m0.136s
user 0m0.032s
sys 0m0.022s
Compile with server, second build (48s):
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::
CLR running!
real 0m0.138s
user 0m0.035s
sys 0m0.021s
Notice all the logging is gone in the second image. To recreate:
git clone https://github.com/spring-projects-experimental/spring-graal-native
cd spring-graal-native/spring-graal-native-feature
git checkout upgrade_19_3
mvn clean package
cd ../spring-graal-native-samples/commandlinerunner
Modify compile.sh to remove --no-server then run it.