spring配置文件路径修改后web.xml配置
2013-05-14 09:19
495 查看
在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配置文件的路径
- persistence.xml配置文件修改存放路径问题的解决办法
- tomcat中的server.xml中的配置文件中<Host appBase="webaps"修改appBase引起的路问题
- ssh整合!Struts.xml、hibernate与spring整合的applicationContext.xml、web.xml文件的配置!
- javaee web.xml中如何设置配置文件的加载路径实例详解
- 服务器运行的状态,修改Spring中的applicationContext.xml配置文件
- 关于项目中web.xml配置文件里面的spring的配置contextConfigLocation
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
- spring的配置文件在web.xml中加载的方式
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序(一)
- web.xml 记载spring 配置文件的写法
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序 研究
- spring与servlet3.0无web.xml文件时的配置方式
- 基于注解的Struts2+Spring2.5+Hibernate3.3的Spring 配置文件,struts配置文件,web.xml配置文件的例子
- 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- spring mvc 在Web.xml中自动扫描Spring的配置文件及resource时classpath*:与classpath:的区别
- 搭建strus2,修改struts.xml配置文件的路径后报错
- Spring applicationContext.xml 文件 路径配置 (2)