Spring多个配置文件的开发
在实际开发中我们可能需要多个applicationContext.xml文件,
下面我记录一下处理方式
第一种像这样,直接在总配置文件后直接逗号加上
ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml","applicationContext.xml2");
第二种直接在applicationContext.xml总文件引入就可以了
<import resource="applicationContext.xml"/>