An ObjectFactory variant with lenient not-unique handling [SPR-13943] #18515
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Stéphane Nicoll opened SPR-13943 and commented
In Spring Boot it is very common to associate a bean to something if it is found in the context. If there is more than one instance but one is flagged as primary then we're fine as well. If there are more than one instance and the user did not mark a preference for one, then we don't know which one to use.
We would need a first class support of that use case, maybe based on the
ObjectFactory
. Something that would return the candidate bean ornull
if none was found.Issue Links:
Referenced from: commits ed98393, 343bb2f
The text was updated successfully, but these errors were encountered: