Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 831
xmlParser Avatar asked Oct 17 '22 17:10

xmlParser


1 Answers

Try with this:

wrapper.java.additional.1=-Dspring.config.location=/opt/MyService/lib/conf/application.properties
like image 109
Bambus Avatar answered Oct 20 '22 22:10

Bambus