Spring中从Classpath路径中读取XML定义文件的几种方式
采集日期:2008-5-3作者:buffet518(注:本数据由系统自动采集,内容与BHCODE无关)
1.ApplicationContext context = new ClassPathXmlApplicationContext("beans-config.xml");
2.ApplicationContext context = new ClassPathXmlApplicationContext(
new String[] {"beans-config.xml","beans-config2.xml"} );
3.ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:beans-config.xml");
4.ApplicationContext context = new ClassPathXmlApplicationContext("beans*.xml");