|
[
Permlink
| « Hide
]
Dave Syer added a comment - 25/Aug/07 11:37 AM
Attached a test case that has an autowire error because of this issue.
Manually setting up the factory bean works (instead of using aop:scoped-proxy):
<bean id="bean" parent="parent" autowire-candidate="false" scope="request"/> <bean id="scoped" class="org.springframework.aop.scope.ScopedProxyFactoryBean" autowire-candidate="false"> <property name="proxyTargetClass" value="true"/> <property name="targetBeanName" value="bean"/> </bean> <bean id="unscoped" parent="parent" /> so it seems the problem is with the bean definition decoration in aop:scoped-proxy. The scoped-proxy bean that is generated for a bean definition decorated with <aop:scoped-proxy/> now inherits the target bean's original 'autowire-candidate' setting when explicitly set to false. The target bean definition itself is still set to 'false' regardless of the scoped-proxy (so that only the proxy is considered as an autowire candidate).
I've backported this to mbranch-2-0 now, so this fix is going to be part of the 2.0.7 release.
Juergen |
|||||||||||||||||||||||||||||||||||||||||||||||||