-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Cannot autowire qualified scoped-proxy @Bean definitions [SPR-11116] #15742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Andreas Höhmann commented Autowire of qualified beans doesn't work for proxies, no matter if I'm using xml configuration or java configuration. |
Andreas Höhmann commented Update: XML based qualified beans working now (my mistake), github project updated. |
Andreas Höhmann commented [fix] add support for
Have a look at ahoehma/spring-autowire-qualified-beans@2547475 |
Andreas Höhmann commented Is it possible to fix this issue for spring 3.2.X too? |
Juergen Hoeller commented I can confirm that Juergen |
Juergen Hoeller commented Fixed for 4.0 GA, detecting qualifier annotations as well as a generic return type declaration on scoped-proxy factory methods. We've been missing tests for scoped-proxy I've backported the qualifier annotations fix to 3.2.6 as well, since it turned out to be based on our existing decoratedDefinition mechanism, with limited effects on the rest of the codebase. 3.2.6 will be released a week after 4.0 GA. Juergen |
Juergen Hoeller commented Andreas, Could you give this an early try within the next few days maybe? Simply run against 4.0.0.BUILD-SNAPSHOT or 3.2.6.BUILD-SNAPSHOT (see http://projects.spring.io/spring-framework/) Juergen |
Andreas Höhmann commented Great. I will try it :) |
Andreas Höhmann commented I have some tests in my sample project: https://github.com/ahoehma/spring-autowire-qualified-beans .., feel free to use the code :) |
Andreas Höhmann commented And please check that custom annotations (i.e |
Juergen Hoeller commented We have all standard cases covered in the unit tests now, so we should be safe from that side. However, I'm still interested in a test within your real-life project - just as a confirmation. If you're using Maven, testing your project against a Spring snapshot should be a straightforward version change in your POM (see http://projects.spring.io/spring-framework/ for repo metadata). Juergen |
Lari Hotari commented This issue might be related to #15871, since the #15742 changes in Spring 3.2.6.RELEASE seem to have fixed problems in Grails related to |
Andreas Höhmann opened SPR-11116 and commented
The old bug spr-5911 was fixed but since spring added support for java based configuration (
@Configuration
,@Bean
) the same problem still exists (I guess).I can't autowire qualified
@Bean
's.Affects: 3.2.3, 3.2.5
Reference URL: https://jira.springsource.org/browse/SPR-5911
Referenced from: commits 2a6c642, c5d7977, 6bed180, 8580d2d
Backported to: 3.2.6
The text was updated successfully, but these errors were encountered: