springboot spring.config.location外挂配置文件实战
生活随笔
收集整理的這篇文章主要介紹了
springboot spring.config.location外挂配置文件实战
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.springboot版本
目前我的springboot版本是v2.2.2.RELEASE
2.合并配置文件到一個文件
在centos 7 系統中,增加一個文件 default.properties ,最后把我們需要的配置文件,放在這個文件里。
3.啟動腳本
特別注意:這里是兩個 - - 的。
--spring.config.location=/xxx/xx/xxx/default.properties這里的xxx,代表著自己的目錄
4.完整的案例
nohup java -jar /data/project/pc/pc.jar --spring.config.location=/data/project/pc/default.properties >/dev/null 2>/data/project/pc/log &總結
以上是生活随笔為你收集整理的springboot spring.config.location外挂配置文件实战的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: xshell 7 官网免费下载
- 下一篇: centos7公司内网环境搭建集群性能测