-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
Kenny MacLeod opened SPR-5744 and commented
I've been using M3 to try porting fragments of existing applications to use @Configuration and @Bean instead of XML bean definitions. The bean classes make heavy use of @Required. When I try to configure one of these beans using annotations, and injecting collaborators java-style, the context fails to start up, saying that a @Required property has not been set.
This is a problem, because these existing application classes are used everywhere, mostly using the @Required annotation in conjunction with XML bean definitions. Also, the context:component-scan tag which is used to locate the @Configuration classes implicitly adds a RequiredAnnotationBeanPostProcessor to the context.
It's not clear how to handle this, unless the framework can automagically figure out that the @Bean method is injecting the collaborators.
I've created a standalone test case illustrating the problem.
Affects: 3.0 M3
Attachments:
- test.zip (1.33 kB)
Referenced from: commits c7b019c