Spring的注解
- <aop:scoped-proxy/>,长生命周期的bean依赖于短生命周期的bean时,对短生命周期的bean使用代理。
<bean id="a" class="com.wei.a" scope="session">
<aop:scoped-proxy />
</bean>
<bean id= "b" class="com.wei.b">
<property name="b" ref="b" />
</bean>
<bean id="a" class="com.wei.a" scope="session">
<aop:scoped-proxy />
</bean>
<bean id= "b" class="com.wei.b">
<property name="b" ref="b" />
</bean>