Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Inconsistent dependency injection of proxied bean [SPR-9322] #13960
I tried to inject collection of beans (services) twice, into two beans (registers); and every register has injected different count of services.
I debug it and found that method org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(..) has critical role in decision process if proxied bean will be injected or not.
I attached simple project with one test case where this specific case is simulated. Of course there are many possibilities to fix it, but when somebody else accidentally configure something like this, it can be really hard to find where is the problem.
I suggest to duplicate condition (about suitability of bean to be injected) also after its creation.
2 votes, 2 watchers