Skip to content
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

Cannot override singleton with scoped proxy [SPR-10744] #15370

spring-issuemaster opened this issue Jul 16, 2013 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Jul 16, 2013

Mike opened SPR-10744 and commented

For testing purposes, I am trying to override a bean configured as a singleton (in production) by making it a scoped proxy using a custom testing scope. The testing configuration extends the production configuration.

However, this bean is never loaded as a scoped proxy at all! When I apply the test configuration, the bean is always autowired as a singleton instead of (the desired) scoped proxy (regardless whether it's a CGLIB or JDK dynamic proxy).

Affects: 3.2.2, 3.2.3

Reference URL:

Issue Links:

  • #15854 Regression in 4.0.0 - A scoped-proxy bean cannot override another bean
  • #15620 @Bean overriding does not pick up metadata from most specific method

Referenced from: commits d0f9853, 299776f

Backported to: 3.2.5


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Apr 28, 2014

Juergen Hoeller commented

This has effectively been fixed along with #15620.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.