In gh-33602, we introduced strict singleton enforcement for bean overrides -- for example, for @MockitoBean, @TestBean, etc. However, the use of BeanFactory#isSingleton(beanName) can result in a BeanCreationException for certain beans, such as a Spring Data JPA FactoryBean for a JpaRepository. In light of that, this commit relaxes the singleton enforcement in BeanOverrideBeanFactoryPostProcessor by only checking the result of BeanDefinition#isSingleton() for existing bean definitions. This commit also updates the Javadoc and reference documentation to reflect the status quo. See gh-33602 Closes gh-33800 |
||
---|---|---|
.. | ||
integration-spring | ||
integration-junit-jupiter.adoc | ||
integration-junit4.adoc | ||
integration-meta.adoc | ||
integration-spring.adoc | ||
integration-standard.adoc |