05_springboot多配置文件
1.多配置文件,其中application.properties中的spring.profiles.active能够灵活的切换使用环境
application.properties
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
spring.profiles.active=pro
application-dev.properties
server.port=8080
server.context-path=/test
application-pro.properties
server.port=80
server.context-path=/
2.部署,在项目目录下生成jar包mvn install
在pro环境下运行
在dev环境下运行
05_springboot多配置文件
原文地址:https://www.cnblogs.com/NaoDaiYouDianDa/p/13992402.html

![05_springboot多配置文件
[编程语言教程]](https://www.zixueka.com/wp-content/uploads/2024/01/1706709821-910da5005117b28.jpg)

