JAVA框架 Spring 引入多个配置文件
1、如果配置文件比较长,可以分多个配置文件。有两种方式:
1)在主配置文件加标签<import/>
1 <import resource="jd/com/other/applicationContext.xml" />
2)方式:
1 ApplicationContext applicationContext = new ClassPathXmlApplicationContext( 2 "applicationContext.xml","applicationContext2.xml");
第二种方式很少用。
学习是一种态度,坚持是质变的利器!