Created
February 11, 2015 11:16
-
-
Save rand0m86/9535b97377198d3b64a8 to your computer and use it in GitHub Desktop.
Spring circular dependency resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="serviceA" class="com.ServiceA" lazy-init="true"> | |
<property name="serviceB" ref="serviceB"/> | |
</bean> | |
<bean id="serviceB" class="com.ServiceB"> | |
<property name="serviceA" ref="serviceAProxy"/> | |
</bean> | |
<bean id="serviceAProxy" class="org.springframework.aop.framework.ProxyFactoryBean"> | |
<property name="targetSource"> | |
<bean class="org.springframework.aop.target.LazyInitTargetSource"> | |
<property name="targetBeanName"> | |
<idref bean="serviceA"/> | |
</property> | |
</bean> | |
</property> | |
</bean> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment