yml多文档块模式
server: port: 8081 spring: profiles: active: prod //通过这个控制采取哪个配置 --- server: port: 8083 spring: profiles: dev --- server: port: 8084 spring: spring: prod
多Profile文件
创建application-{profile}.properties
如:application-prod.properties,application-dev.properties
通过application.properties文件中以下代码:
spring.profiles.active=prod//通过这个调用
原文始发于:
主题测试文章,只做测试使用。发布者:夏枳★,转转请注明出处:http://www.cxybcw.com/114288.html