-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Circular dependency problem [SPR-10349] #14983
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
Adam Pierzchała commented What is more, there is inconsistency. A reversed case does work:
And there is a workaround for the first example that I have provided (adding |
Adam Pierzchała commented It looks like related to #6186. |
Alexei Shpikat commented |
Bulk closing outdated, unresolved issues. Please, reopen if still relevant. |
Adam Pierzchała opened SPR-10349 and commented
I believe that situation that I have described in Stackoverflow is a bug (see Reference URL). Such usage of
@Autowired
should work.In this case
A
object requires aB
to be constructed, butB
does not require anything. So the order could be:And there is no circular dependency.
Let me copy it here so that you don't have to jump to Stackoverflow:
Exception that I get:
Affects: 3.2.1
Reference URL: http://stackoverflow.com/questions/15188961/spring-circular-dependency-using-setters
Issue Links:
@Autowired
properties not reliably set in FactoryBean before getObject ("duplicates")3 votes, 5 watchers
The text was updated successfully, but these errors were encountered: