**[Jakub Bochenski](https://jira.spring.io/secure/ViewProfile.jspa?name=jbochenski)** opened **[SPR-13741](https://jira.spring.io/browse/SPR-13741?redirect=false)** and commented Basically what was reported on SO Offending line: ``` Map<String, T> candidateBeans = BeanFactoryUtils.beansOfTypeIncludingAncestors(bf, beanType); ``` ``` --- **Affects:** 3.2.15, 4.1.8, 4.2.3 **Reference URL:** https://stackoverflow.com/questions/27177364/spring-candidate-bean-type-strategy-is-bad **Issue Links:** - #19178 Avoid creation of lazy candidates when the primary bean is injected **Backported to:** [4.1.9](https://github.com/spring-projects/spring-framework/milestone/133?closed=1), [3.2.16](https://github.com/spring-projects/spring-framework/milestone/104?closed=1)