Deprecate use of several bean factory methods for the same bean in a configuration class #31073
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Consider the following use case:
The container accepts an override for
myBean
as long as it is in the same configuration class to mimic the resolution of the greediest satisfiable constructors for bean factory methods.Such an arrangement is much better served using
Optional
orObjectProvider
with a single bean factory method as it makes it explicit that some argument may or may not be available.The text was updated successfully, but these errors were encountered: