摘要: 方式一:把applicationContext.xml直接放在WEB-INF/classes下,spring会采用默认的加载方式方式二:采用在web.xml中配置ContextLoaderListenera或ContextLoaderServlet指定加载路径方式。它们两个有着同样的功能,都实现在了org.springframework.web.context.ContextLoader类,都要定义contextConfigLocation参数。区别在于listener不能在Servlet 2.2兼容的容器中使用。自从Servelt 2.4规范,listener被要求在web应用启动后初始化。 阅读全文
posted @ 2013-04-23 10:19 逐梦北京 阅读(292) 评论(0) 推荐(0)