- работает, а
@Profile({"!dev","!test"}) - нет.
потому-что тут будет не дев ИЛИ не тест
==== A profile expression allows for more complicated profile logic to be expressed, for example "p1 & p2". See Profiles.of(String...) https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Profile.html ======= The following operators are supported in profile expressions. ! - A logical NOT of the profile or profile expression & - A logical AND of the profiles or profile expressions | - A logical OR of the profiles or profile expressions Please note that the & and | operators may not be mixed without using parentheses. For example "a & b | c" is not a valid expression; it must be expressed as "(a & b) | c" or "a & (b | c)". https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/core/env/Profiles.html#of-java.lang.String...-
Пробуй как говорит спека: @Profile(“!dev & !test”)
вам уже посоветовали
Обсуждают сегодня