I am using @ComponentScan
and @Component
to define my spring beans. What I would like is to declare one of these beans to be autowire-candidate=false
.
This could be done with this attribute in xml. Isn't there the equivalent in annotations?
The reason I want this is because I have 2 implementations of the same interface and I don't want to use @Qualifier
.
EDIT: Using @Primary is a valid work-around, but autowire-candidate seems to me like a useful feature with its own semantics.
Thanks