Stereotype @Profiles not merged [SPR-10812] #15438
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Emerson Farrugia opened SPR-10812 and commented
I created environment stereotype annotations
@Production
,@Staging
, and@Development
to easily control which environment a few beans are available in. These annotations in turn have@Profile
("somestring") as a meta-annotation.I've hit an issue where the same
@Component
might be available in multiple environments, but not all of them, e.g.@Staging
@Production
@Service
public class SomeService { ...
The org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider only sees one of the
@Profile
meta-annotations, and I don't see an obvious pattern as to which it's picking.Is it possible to compute the disjunction of all available profiles in this case? Profile negation might be fun.
Affects: 3.2.3
Issue Links:
@Profile
annotations not working on@Configuration
classesReferenced from: commits aecf60d
The text was updated successfully, but these errors were encountered: