Custom resolution of preferred constructors for createBean(Class)
Avoids side effects of traditional AUTOWIRE_CONSTRUCTOR algorithm. Closes gh-30041
This commit is contained in:
@@ -144,7 +144,7 @@ public final class SpringBeanContainer implements BeanContainer {
|
||||
try {
|
||||
if (lifecycleOptions.useJpaCompliantCreation()) {
|
||||
return new SpringContainedBean<>(
|
||||
this.beanFactory.createBean(beanType),
|
||||
this.beanFactory.createBean(beanType, AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR, false),
|
||||
this.beanFactory::destroyBean);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user