spring中的web.xml部分属性详细
2014-02-20 22:19
357 查看
1、
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
classpath:applicationContext.xml 可以用 /WEB-INF /classes/ applicationContext.xml 代替
注意:classpath:只会到你的class路径中查找找文件
2、contextConfigLocation:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
在web.xml中通过contextConfigLocation配置spring,contextConfigLocation 参数定义了要装入的 Spring 配置文件
在web.xml里给该Listener指定要加载的xml
如果想装入多个配置文件,可以在
web.xml中classpath是什么含义:classpath就是代表 /WEB-INF /classes/ 这个路径
<context-param><param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
classpath:applicationContext.xml 可以用 /WEB-INF /classes/ applicationContext.xml 代替
注意:classpath:只会到你的class路径中查找找文件
2、contextConfigLocation:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
在web.xml中通过contextConfigLocation配置spring,contextConfigLocation 参数定义了要装入的 Spring 配置文件
在web.xml里给该Listener指定要加载的xml
如果想装入多个配置文件,可以在
<param-value>标记中用逗号作分隔符
相关文章推荐
- Spring —— web.xml 中用 PropertyPlaceholderConfigurer 类读取properties 文件 或 属性
- Spring在web.xml中的配置详细介绍
- spring boot 用war包部署到tomcat下详细教程(解决缺少web.xml报错的问题)
- web.xml详细解读(flex项目,框架:cairngorm--blazeDS--spring--ibatis)(正在编写中)
- springmvc+shiro简单配置及作用(WEB.XML springmvc部分)
- 加载spring在web.xml中相关配置
- web.xml 详细介绍
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序(一)
- web.xml配置详细
- spring web.xml 难点配置总结【转】
- SpringMVC+Hibernate+jQuery+js+css+jsp+nginx整合时,(1)jsp引入js,css无效;(2)插入数据库时某字段为空;(3)web.xml配置完后,从数据库读数
- spring与struts2 mvc共存web.xml简单配置
- struts2与spring整合web.xml加入的配置
- SpringMVC+idea中web.xml文件的The content of element type "web-app" must match问题
- 整合Spring+Hibernate+Struts2时遇到的WEB-INF/lib/struts2-core-2.1.8.1jar!/struts-default.xml:48:178错误
- spring data jpa 查询部分属性
- Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]
- spring 3.0配置实例-web.xml
- web.xml 详细介绍
- web.xml中servlet, spring, filter, listenr的配置