Add tests for SpringBeanContainer (Hibernate ORM integration) and fix the behavior when requesting named beans (#22260)

* Add integration tests for SpringBeanContainer (Hibernate ORM integration)
* Autowire bean properties of beans retrieved by name in SpringBeanContainer
* Add integration tests for fallback cases in SpringBeanContainer (Hibernate ORM integration)
* Fix SpringBeanContainer incorrectly losing the bean name when calling the fallback producer
This commit is contained in:
Yoann Rodière
2019-02-05 15:39:46 +01:00
committed by Juergen Hoeller
parent 4c9ae6494f
commit 00855c4f5f
8 changed files with 516 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<bean id="single" class="org.springframework.orm.jpa.hibernate.beans.SinglePrototypeInSpringContextTestBean" scope="prototype">
<property name="source" value="SPRING" />
<property name="name" value="single" />
</bean>
<bean id="multiple-1" class="org.springframework.orm.jpa.hibernate.beans.MultiplePrototypesInSpringContextTestBean" scope="prototype">
<property name="source" value="SPRING" />
<property name="name" value="multiple-1" />
</bean>
<bean id="multiple-2" class="org.springframework.orm.jpa.hibernate.beans.MultiplePrototypesInSpringContextTestBean" scope="prototype">
<property name="source" value="SPRING" />
<property name="name" value="multiple-2" />
</bean>
</beans>