prototype FactoryBean<Object> instantiated during singleton-creation #23495
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
Affects: 5.1.6 up to 5.2.0.RC1 (worked in 5.1.5)
If I define a prototype-scoped bean of type FactoryBean there is an attempt made to instantiate it during singleton-creating. If that bean needs a parameter that is not present in the context (as it will be provided at creating-time), in earlier versions this failed silently, now it throws. Seems to be the result of #22409.
Version 5.1.5 and prio log this Exception:
Version 5.1.6 and later throw this Exception:
See the attached test case spring-prototype.zip. Run with
mvn test
. Vary versions inpom.xml
.The text was updated successfully, but these errors were encountered: