Spring与普通使用的融合 –编码测试


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

方式:在类中手动连接:
?? ? ?? ApplicationContext ac = new ClassPathXmlApplicationContext(“applicationContext.xml”);
??? ??? ManageInf mi = (ManageInf) ac.getBean( “manageInf” );
??? ??? mi.update();
这样一与配置文件相接触,IOC, AOP之类就会自动完成注入与关联!
而与Struts整合因在web.xml中配置了listener,故一切都是自动完成,无需手动创建bean.