简单示例代码:
<bean id="registerAction" class="com.lantsky.action.RegisterAction" scope="prototype">
<property name="userManageService">
<ref bean="userManageService"/>
</property>
</bean>
<property name="userManageService">
<ref bean="userManageService"/>
</property>
</bean>
可以写成:
<bean id="registerAction" class="com.lantsky.action.RegisterAction" scope="prototype" autowire="byName"/>