byName时,如何修改了ID也能执行呢?
AutoWiringService 类中: public class AutoWiringService { private AutoWiringDAO autoWiringDAO111; public void setAutoWiringDAO(AutoWiringDAO autoWiringDAO111) { System.out.println("setAutoWiringDAO"); this.autoWiringDAO111 = autoWiringDAO111; } public void say(String word){ this.autoWiringDAO111.say(word); } }
xml文件中: <bean id="autoWiringDAO111" class="com.imooc.autowiring.dao.AutoWiringDAO"></bean>
我这么设置不能执行,那么需要怎么设置再能执行呢?