Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
来源:互联网 发布:mac 安装虚拟安卓系统 编辑:程序博客网 时间:2024/05/16 05:44
因为直接使用了SpringMVC,所以之前一直不明白xxx-servlet.xml和applicationContext.xml是如何区别的,其实如果直接使用SpringMVC是可以不添加applicationContext.xml文件的。
使用applicationContext.xml文件时是需要在web.xml中添加listener的:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
而这个一般是采用非spring mvc架构,如使用struts之类而又想引入spring才添加的,这个是用来加载Application Context。
如果直接采用SpringMVC,只需要把所有相关配置放到xxx-servlet.xml中就OK了。
使用applicationContext.xml文件时是需要在web.xml中添加listener的:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
而这个一般是采用非spring mvc架构,如使用struts之类而又想引入spring才添加的,这个是用来加载Application Context。
如果直接采用SpringMVC,只需要把所有相关配置放到xxx-servlet.xml中就OK了。
0 0
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- 【转载】Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- applicationContext.xml与xxx-servlet.xml的区别?
- applicationContext-XXX.xml和XXX-servlet.xml的区别
- Spring中xxx-servlet.xml跟applicationContext.xml的认识
- Spring中xxx-servlet.xml跟applicationContext.xml的认识
- Spring中xxx-servlet.xml跟applicationContext.xml的认识
- Spring中xxx-servlet.xml和applicationContext.xml的认识
- xxx-servlet.xml和applicationContext.xml的区别
- spring中的applicationContext.xml和xxx-servlet.xml
- 【SpringMVC之配置文件(一)】spring 里面的ApplicationContext.xml 和 xxx-servlet.xml分别的作用是什么?
- type的用法总结
- magento各个文件“简介”
- gloox开发
- 面试题、算法题收藏
- Linux环境下Qt creator添加OpenCV的配置
- Spring中的applicationContext.xml与SpringMVC的xxx-servlet.xml的区别
- windows自带的开机软件设置
- android.util.Pair
- Unity中Update与其他update的区别
- 奥巴马宣布330亿美元援非计划 自称非洲人之子
- java+javabean 连接数据库 写数据 读数据
- Java网络编程1---基本网络的概念(通俗概念)
- POJ1149 PIGS(最大流)
- Monitoring Aggregations