Java Spring启动可执行文件在conf文件中运行参数
当我将init.d服务与Java Spring启动可执行文件在conf文件中运行参数,java,spring-boot,command-line-arguments,executable-jar,Java,Spring Boot,Command Line Arguments,Executable Jar,当我将init.d服务与conf文件一起使用并放入custom中时: RUN_ARGS=--spring.config.location=/usr/share/application/config/app.properties 近似 服务按预期启动 但是,如果我有默认名称和位置application.properties,但需要传递实例--logging.config: RUN_ARGS=--logging.config=/usr/share/application/config/logback
conf
文件一起使用并放入custom中时:
RUN_ARGS=--spring.config.location=/usr/share/application/config/app.properties
近似
服务按预期启动
但是,如果我有默认名称和位置application.properties
,但需要传递实例--logging.config
:
RUN_ARGS=--logging.config=/usr/share/application/config/logback spring.xml
服务不会启动,即使在将DEBUG=true
添加到conf
文件后,我也看不到任何消息
编辑:JAVA选项的类似问题:
JAVA_OPTS=“-Dspring.profiles.active=dev”
这很好,但是举个例子
JAVA_OPTS=“-Xmx1024m”
服务启动失败