Let custom ObjectProvider
implementations declare a single method only
#33070
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Historically,
ObjectProvider
comes with several default methods already but still requires concrete implementations to declare four methods. For unit testing purposes, it would be great to just declare the concrete method that a caller actually needs (such asgetObject()
orgetIfAvailable()
), or to provide astream()
implementation with all otherObjectProvider
methods reacting to it, e.g.or
As of 6.2, a complete set of default methods in
ObjectProvider
itself enables all kinds of such custom usage.The text was updated successfully, but these errors were encountered: