Spring @Profile注解进阶使用

2021-11-16  本文已影响0人  湘西刺客王胡子

@Profile("a") : 在a环境下生效
@Profile("!a") : 在除a之外的其他环境下生效
@Profile({"a", "b", "c"}) = @Profile("a | b | c") : 在a、b、c环境下生效
@Profile("!a & !b & !c") :在除a、b、c之外的其他环境下生效

上一篇 下一篇

猜你喜欢

热点阅读