加载Spring配置文件常用的三种方法
来源:互联网 发布:本子作者知乎 编辑:程序博客网 时间:2024/04/18 21:56
1方法(web.xml)
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
2方法(web.xml)
<web-app>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml</param-value>
</context-param>
<servlet>
<servlet-name>SpringContextServlet</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
</web-app>
3方法在(struts-config.xml)中加载
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/applicationContext.xml,
/WEB-INF/action-servlet.xml"/>
</plug-in>
- 加载spring配置文件的常用三种方法
- 加载Spring配置文件常用的三种方法
- 加载spring配置文件的常用三种方法
- 加载spring配置文件的常用三种方法
- Web应用中加载Spring配置文件的三种方法
- Spring加载配置文件的三种方式
- Spring加载配置文件的几种方法
- spring 中加载xml配置文件的方法
- Spring 加载配置文件的几个方法
- Spring中加载XML配置文件的方法
- spring加载配置文件三办法
- spring配置文件的加载
- VC 加载自定义形状鼠标的三种常用方法
- jQuery页面加载初始化常用的三种方法
- jQuery页面加载初始化常用的三种方法
- 页面加载初始化常用的三种方法
- jQuery页面加载初始化常用的三种方法
- jQuery页面加载初始化常用的三种方法
- [摘自互联网]软件自动化框架的发展
- 研究生的学习
- 使用组件和对象
- httpclient得到gmai,yahoo列表
- 浅谈3G
- 加载Spring配置文件常用的三种方法
- [摘自互联网]软件需求的层次
- flash 容器滚动效果
- 免费图书下载
- Boyer-Moore 算法详解
- 过滤非法字符
- Ubuntu 库文件链接 搜索当前路径的问题
- [摘自互联网]控制流图及圈复杂度计算
- 转载:Cocoa 学习资源分享