@Profile should be able to define profiles to accomplish the 'and' scenario [SPR-15634] #20193
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
type: task
A general task
Manuel Jordan opened SPR-15634 and commented
The current
@Profile
's value attribute behaves how an ORThus having the following:
or
It behaves: use this bean when the profile is either
jmx
orfile
(mostly for the second scenario, seems I need other approach for the first scenario, I mean, an annotation that wraps other annotations)Seems we need a new attribute that behaves how an AND. It to represents:
use this bean when the profiles are
jmx
andfile
Sadly it is not a
@Configuration
class where I am able to use the@Profile
together with the@Configuration
and@Bean
to represent the AND scenario. But here we are in the business or model area.Not sure if exists other approach to accomplish this.
Thank you.
Affects: 4.3 GA, 4.3.8
Reference URL: https://stackoverflow.com/questions/38133808/spring-multiple-profiles-active
Issue Links:
@Profile
annotation ("duplicates")The text was updated successfully, but these errors were encountered: