【Spring学习笔记】ApplicationContext Vs WebApplicationContext
来源:互联网 发布:数据安全保密承诺书 编辑:程序博客网 时间:2024/06/05 15:23
ApplicationContext
applicationContext.xml is the root context configuration for every web application. Spring loads applicationContext.xml file and creates the ApplicationContext for the whole application. There will be only one application context per web application. If you are not explicitly declaring the context configuration file name in web.xml using the contextConfigLocation param, Spring will search for the applicationContext.xml under WEB-INF folder and throw FileNotFoundException if it could not find this file.
WebApplicationContext
Apart from ApplicationContext, there can be multiple WebApplicationContext in a single web application. In simple words, each DispatcherServlet associated with single WebApplicationContext. xxx-servlet.xml file is specific to the DispatcherServlet and a web application can have more than one DispatcherServlet configured to handle the requests. In such scenrios, each DispatcherServlet would have a separate xxx-servlet.xml configured. But, applicationContext.xml will be common for all the servlet configuration files. Spring will by default load file named “xxx-servlet.xml” from your webapps WEB-INF folder where xxx is the servlet name in web.xml. If you want to change the name of that file name or change the location, add initi-param with contextConfigLocation as param name.
参考:
http://stackoverflow.com/questions/11708967/what-is-the-difference-between-applicationcontext-and-webapplicationcontext-in-s
- 【Spring学习笔记】ApplicationContext Vs WebApplicationContext
- Spring 学习笔记(2)—— ApplicationContext 及 WebApplicationContext 的初始化
- Spring学习(十)BeanFactory VS ApplicationContext
- [学习笔记] Spring beanfactory applicationcontext
- spring mvc 下 applicationContext 和webApplicationContext
- Spring获取webapplicationcontext,applicationcontext几种方法
- spring获取webapplicationcontext,applicationcontext几种方法
- Spring 中 ApplicationContext 、WebApplicationContext 和 BeanFactory 比较
- spring mvc 下 applicationContext 和webApplicationContext
- Spring 中 ApplicationContext 、WebApplicationContext跟 BeanFactory比较
- spring获取webapplicationcontext,applicationcontext几种方法
- Spring容器ApplicationContext实现和配置WebApplicationContext
- ApplicationContext,WebApplicationContext
- ApplicationContext,WebApplicationContext
- Spring MVC学习------------WebApplicationContext
- Spring MVC学习------------WebApplicationContext
- What is a Context in Java and ApplicationContext vs WebApplicationContext
- 【spring框架】spring获取webapplicationcontext,applicationcontext几种方法详解
- [Unity]最近遇到的几个问题.(不间断更新)
- Two Sum
- ORACLE EXPLAIN PLAN的总结 (优化SQL语句)
- BeanUtils
- OpenCV ROI区域图像叠加&初级图像混合
- 【Spring学习笔记】ApplicationContext Vs WebApplicationContext
- 当下最流行的点击效果插件 waves.js
- CUDA 编程实例:计算点云法线
- 3.7.1计算电费
- Maven 常规错误一览及解决方案
- tomcat 安装
- 图片相似度(汉明距离)
- OCR文字识别软件怎么保存文件为PPTX 格式
- sizeof(结构体)