Ignore resolved bean from non-active scope in getIfAvailable/getIfUnique
Closes gh-24822
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
https://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<bean id="requestScopedObject" class="org.springframework.beans.testfixture.beans.TestBean" scope="request">
|
||||
<property name="name" value="#{request.contextPath}"/>
|
||||
@@ -12,6 +11,8 @@
|
||||
|
||||
<bean id="requestScopedFactoryBean" class="org.springframework.beans.testfixture.beans.factory.DummyFactory" scope="request"/>
|
||||
|
||||
<bean id="requestScopedUniqueBean" class="org.springframework.beans.testfixture.beans.CountingTestBean" scope="request"/>
|
||||
|
||||
<bean id="requestScopedObjectCircle1" class="org.springframework.beans.testfixture.beans.TestBean" scope="request">
|
||||
<property name="spouse" ref="requestScopedObjectCircle2"/>
|
||||
</bean>
|
||||
@@ -20,22 +21,22 @@
|
||||
<property name="spouse" ref="requestScopedObjectCircle1"/>
|
||||
</bean>
|
||||
|
||||
<bean id="requestScopedOuterBean" class="org.springframework.beans.testfixture.beans.DerivedTestBean" scope="request">
|
||||
<property name="name" value="outer"/>
|
||||
<property name="spouse">
|
||||
<bean class="org.springframework.beans.testfixture.beans.DerivedTestBean">
|
||||
<property name="name" value="inner"/>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="requestScopedOuterBean" class="org.springframework.beans.testfixture.beans.DerivedTestBean" scope="request">
|
||||
<property name="name" value="outer"/>
|
||||
<property name="spouse">
|
||||
<bean class="org.springframework.beans.testfixture.beans.DerivedTestBean">
|
||||
<property name="name" value="inner"/>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="singletonOuterBean" class="org.springframework.beans.testfixture.beans.DerivedTestBean" lazy-init="true">
|
||||
<property name="name" value="outer"/>
|
||||
<property name="spouse">
|
||||
<bean class="org.springframework.beans.testfixture.beans.DerivedTestBean" scope="request">
|
||||
<property name="name" value="inner"/>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="singletonOuterBean" class="org.springframework.beans.testfixture.beans.DerivedTestBean" lazy-init="true">
|
||||
<property name="name" value="outer"/>
|
||||
<property name="spouse">
|
||||
<bean class="org.springframework.beans.testfixture.beans.DerivedTestBean" scope="request">
|
||||
<property name="name" value="inner"/>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
<aop:scoped-proxy/>
|
||||
</bean>
|
||||
|
||||
<bean id="requestScopedUniqueBean" class="org.springframework.beans.testfixture.beans.CountingTestBean" scope="request">
|
||||
<aop:scoped-proxy/>
|
||||
</bean>
|
||||
|
||||
<bean id="requestScopedObjectCircle1" class="org.springframework.beans.testfixture.beans.TestBean" scope="request">
|
||||
<aop:scoped-proxy/>
|
||||
<property name="spouse" ref="requestScopedObjectCircle2"/>
|
||||
|
||||
Reference in New Issue
Block a user