Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring启动可执行文件在conf文件中运行参数_Java_Spring Boot_Command Line Arguments_Executable Jar - Fatal编程技术网

Java Spring启动可执行文件在conf文件中运行参数

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

当我将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 spring.xml

服务不会启动,即使在将
DEBUG=true
添加到
conf
文件后,我也看不到任何消息

编辑:JAVA选项的类似问题:

JAVA_OPTS=“-Dspring.profiles.active=dev”

这很好,但是举个例子

JAVA_OPTS=“-Xmx1024m”

服务启动失败