2.4版本之前 --- spring: profiles: test server: port: 8022 ---
激活方式为
spring:
profiles:
active: test
2.4版本后
server:
port: 8083
spring:
config:
activate:
on-profile: "test"(双引号非必须)
激活方式为
spring:
profiles:
active: "test"
虚拟机参数配置(会覆盖配置文件中的配置)
-Dspring.profiles.active="test"
命令行的参数配置
--spring.profiles.active=“test”



