spring加载xml初始化环境

   //maven加载spring test环境
    public void initSpring() {
        String path = "src/main/webapp/WEB-INF/";
        String[] filePath = {path + "applicationContext.xml",
            path + "dispatcher-servlet.xml",
            path + "spring-quartz.xml"
        };
        ApplicationContext context = new FileSystemXmlApplicationContext(filePath);
    }

猜你喜欢

转载自zonglezuo.iteye.com/blog/2092629