I have a Spring boot application that is started as a service using Linux's systemd.
It is based on this documentation :
With the default script, the jar file start. It works fine.
I finally found a solution here : how to configure heap size when start a spring-boot application with embedded tomcat?
The content of my .conf file was wrong. I need too write this :
export JAVA_OPTS="-Xms256m -Xmx512m"
Now when I run "service myapp start", it start with the good heap size.