原文路径是:https://blog.csdn.net/guanfl/article/details/72123338
springboot maven 多环境配置
1.使用Intellij IDEA创建Spring Boot和Maven项目
2.Spring Boot项目下application.yaml(yaml支持中文)或者application.properties(properties不支持中文)
application.yaml
application.properties
3.创建不同环境下的配置文件
application-dev.yml、application-test.yml、application-prod.yml或者application-dev.properties、application-test.properties、application-prod.properties
4.pom.xml文件中配置profiles节点
5.使用maven命令打包成相应环境的程序包
生产环境
测试环境
开发环境