linux下springboot项目 使用rc.local自启动时不加载自己指定的配置文件
脚本名称restart_boot.sh
#参数配置
BaseDir=/biz
JarName=$BaseDir/VisitorSystem.jar
LogsPatch=$BaseDir/logs_$Port
#启动脚本
nohup java -jar -Dlogging.path=$LogsPatch $JarName --spring.config.location=$BaseDir/application-pro.yml --spring.profiles.active=pro >$LogsPatch/catlina.out 2>&1 &
rc.local里边
#添加了这么一行
sh /biz/restart_boot.sh
--spring.config.location
改成
-Dspring.config.location
看看
还是不行