<bean id="chinese" class="com.dora.testingPerson.bean.Chinese" depends-on="stoneaxe">
<property name="axe" ref="stoneaxe" />
</bean>
<bean id="stoneaxe" class="com.dora.testingPerson.bean.StoneAxe" />
在初始化chinese之前,强制初始化stoneaxe。
<bean id="chinese" class="com.dora.testingPerson.bean.Chinese" depends-on="stoneaxe">
<property name="axe" ref="stoneaxe" />
</bean>
<bean id="stoneaxe" class="com.dora.testingPerson.bean.StoneAxe" />