yml中引用系统环境变量很简单
1.设置环境变量:
vim /etc/profile 打开配置文件,在末尾添加:
export mongodb_url='mongodb://127.0.0.1:27017/transformers'
source /etc/profile
2.修改application.yml文件:

3.打包:本地没有环境变量,打包时可跳过测试
mvn clean package -Dmaven.test.skip=true
yml中引用系统环境变量很简单
1.设置环境变量:
vim /etc/profile 打开配置文件,在末尾添加:
export mongodb_url='mongodb://127.0.0.1:27017/transformers'
source /etc/profile
2.修改application.yml文件:
3.打包:本地没有环境变量,打包时可跳过测试
mvn clean package -Dmaven.test.skip=true
本文标题:yml文件中引用系统环境变量
本文链接:https://www.haomeiwen.com/subject/davvpktx.html
网友评论