加载spring配置文件的常用三种方法
来源:互联网 发布:互助系统 源码 编辑:程序博客网 时间:2024/04/26 12:12
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>
<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页面加载初始化常用的三种方法
- Driver development on Mac OS X (1)
- 升级VC7项目到VC8的注意事项
- WEB应用handy框架极速开发利器之handy toolkit
- 今天感觉脑袋不是我的了
- 用taglib提取mp3文件中的图片和一些其它信息的实例
- 加载spring配置文件的常用三种方法
- 情
- sql server 分布式开发 sp_addlinkedserver sp_addlinkedsrvlogin应用
- 从两方面看AJAX与B/S
- 不同服务器数据库之间的数据操作
- 万网的DNS服务也可以设置SPF记录
- 用css把表单的input输入框变成下划线
- 与大家分享uclinux上的ucd-snmp开发过程
- 保证相同类型的MDI子窗体只会被打开一次的方法