@Profile("a") : 在a环境下生效
@Profile("!a") : 在除a之外的其他环境下生效
@Profile({"a", "b", "c"}) = @Profile("a | b | c") : 在a、b、c环境下生效
@Profile("!a & !b & !c") :在除a、b、c之外的其他环境下生效
@Profile("a") : 在a环境下生效
@Profile("!a") : 在除a之外的其他环境下生效
@Profile({"a", "b", "c"}) = @Profile("a | b | c") : 在a、b、c环境下生效
@Profile("!a & !b & !c") :在除a、b、c之外的其他环境下生效
本文标题:Spring @Profile注解进阶使用
本文链接:https://www.haomeiwen.com/subject/wukhtrtx.html
网友评论