一、使用 spring.profiles.include
application-{参数}.properties
1)在 application.properties 中配置 spring.profiles.include = xxx
2)在 application.properties 同级目录下创建 application-xxx.properties文件,
3)可以使用spring.profiles.include引用多个文件每个属性 spring.profiles.include = a,b,c
需要对应的创建 application-a.properties 、 application-b.properties、 application-c.properties文件
二、使用 spring.profiles.active
spring.profiles.active主要配置运行环境
1)在 application.properties 中配置 spring.profiles.active= xxx
2)在 application.properties 同级目录下创建 application-xxx.properties文件