javaspring-bootjava-service-wrappertanuki

Wrapping Spring Boot application with Tanuki Service Wrapper


How to wrap Spring Boot application as a linux daemon and to set it to read from application.properties.

To start the jar with the parameters from the application.properties I am using this command:

java -Dspring.config.location=/application.properties -jar MyJar.jar

Where to set this in wrapper.conf?

I have tried like this but the jar is not starting with the parameters from the application.properties.

wrapper.java.command=java
wrapper.java.command.loglevel=INFO
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=/opt/MyService/lib/MyApp.jar
wrapper.java.library.path.1=../lib
wrapper.logfile=../logs/wrapper.log
wrapper.app.parameter.1=/opt/MyService/lib/MyApp.jar
wrapper.app.parameter.2=-c
wrapper.app.parameter.3=/opt/MyService/lib/conf

Solution

  • Try with this:

    wrapper.java.additional.1=-Dspring.config.location=/opt/MyService/lib/conf/application.properties