/**
* @param args
*/
private static final CountDownLatch shutdownLatch = new CountDownLatch(1);
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
ApplicationContext context = new ClassPathXmlApplicationContext("conf/spring/Spring_Base.xml");
shutdownLatch.await();
} catch (InterruptedException e) {
}
}
加载的是conf包下面的,conf包在src下的第一层包。Spring_Base.xml文件可以导入其他spring文件比如
<import resource="Spring_Dao.xml" />
<import resource="Spring_Database.xml" />
<import resource="Spring_XNet.xml" />
<import resource="ServerConfig.xml" />