@Qualifier not working after 2.5 -> 3.0.3 upgrade
Hi,
Is there anything special I need to do in the config, to make springs @Qualifier work with 3.0.3? I had this perfectly working with 2.5, but after an upgrade, it does not. No code changes except upgrade of jars were done.
I have a marker interface:
Code:
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Qualifier
@Inherited
public @interface Autotaks {
}
which is @Qualifier annotated. I then have bean:
Code:
@Service
@Autotaks
@Transactional
public class AutotaksTimeprisCollectorServiceImpl extends implements TimeprisCollectorService {
...
}
and then inject like this:
Code:
@Autowired
@Autotaks
TimeprisCollectorService timeprisCollectorService;
which now fails in spring 3.0.3 :-(
If I change it to:
Code:
@Resource(name = "autotaksTimeprisCollectorServiceImpl")
TimeprisCollectorService timeprisCollectorService;
it works, but it kinda defeats the purpose of the @Qualifier :-)
Should I switch to JSR-330 @Inject with its qualifier instead?