示例为虚拟机参数指定时
-Dspring.profiles.include=b,a
-Dspring.profiles.group.a=b,c
-Dspring.profiles.active=e,f
-Dspring.profiles.default=g,j
include group active 会按照配置顺序依次加载,如图,加载顺序如下
b > a > c > e > f
配置覆盖:相同的key在不同的文件中,最后加载的会覆盖最先加载的key
示例为虚拟机参数指定时
-Dspring.profiles.include=b,a
-Dspring.profiles.group.a=b,c
-Dspring.profiles.active=e,f
-Dspring.profiles.default=g,j
include group active 会按照配置顺序依次加载,如图,加载顺序如下
b > a > c > e > f
配置覆盖:相同的key在不同的文件中,最后加载的会覆盖最先加载的key