spring配置文件路径修改后web.xml配置
2013-05-14 09:19
411 查看
在web.xml中加入
这样系统会自动读取/WEB-INF/applicationContext.xml
如果自己定义文件名,还需要增加
此时的applicationContext.xml在src目录下
<listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener>
这样系统会自动读取/WEB-INF/applicationContext.xml
如果自己定义文件名,还需要增加
<context-param> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> </context-param>
此时的applicationContext.xml在src目录下
相关文章推荐
- spring配置文件路径修改后web.xml配置
- Spring和Struts2配置文件不在默认路径下的web.xml配置方法
- 在web.xml中配置spring配置文件的路径
- 160329(一)、在web.xml文件里配置org.springframework.web.context.ContextLoaderListener
- 通过web.xml文件自动启动spring容器加载对应的配置文件
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- Spring常用的web.xml文件配置
- 一个spring web的配置文件web.xml
- 如何将Spring的配置文件放到web.xml中
- web.xml中如何设置配置文件的加载路径
- 基于Proguard软件基础上,针对Web项目xml配置文件修改的java项目。
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 关于j2ee工程发布到was上后,部分更新,例修改web.xml配置文件不起作用的原因解析【转】
- Spring整合Hibernate的XML文件配置,以及web.xml文件配置
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- web.xml中配置spring配置(application.xml)文件
- 第2.1.4章 WEB系统最佳实践Spring文件配置之spring-hessian-server.xml
- 第2.1.9章 WEB系统最佳实践Spring文件配置之spring-dubbo.xml
- SSM-4 web.xml 及相关spring配置文件