Avoid creation of lazy candidates when the primary bean is injected [SPR-14611] #19178
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Asaf Romano opened SPR-14611 and commented
Consider the following code in a Config class:
Later on, someone injects the primary bean as follows:
The expectation is for the primary bean to be constructed and injected at this point, but for the other two beans not to be constructed yet (as they are lazy). What seems to happen, however, is that all three beans are constructed at this point (albeit the primary bean is successfully injected).
Please note that this issue seems to be quite similar to #18314
Affects: 4.3.2
Issue Links:
Referenced from: commits c4fcdb6, a7849b2
The text was updated successfully, but these errors were encountered: