I basically have a bean in Spring that I wanted to activate only when 2 profiles are active. Basically, it would be like:
@Profile({\"Tomcat\", \"Linux\"}) p
The first profile is on the Top level. The second I checked like this:
@Autowired private Environment env; ... final boolean isMyProfile = Arrays.stream(env.getActiveProfiles()).anyMatch("MyProfile"::equals);