用Tanuki Service Wrapper包装Spring Boot应用程序 [英] Wrapping Spring Boot application with Tanuki Service Wrapper

查看:73
本文介绍了用Tanuki Service Wrapper包装Spring Boot应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Spring Boot应用程序包装为linux守护程序并将其设置为从application.properties中读取.

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

要使用来自application.properties的参数启动jar,我正在使用以下命令:

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

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

在wrapper.conf中的哪里设置?

Where to set this in wrapper.conf?

我已经尝试过了,但是jar不是从application.properties中的参数开始的.

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

推荐答案

尝试一下:

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

这篇关于用Tanuki Service Wrapper包装Spring Boot应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆