配置Spring的用于解决懒加载问题的过滤器
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- 配置Spring的用于初始化容器对象的监听器 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext*.xml</param-value>
</context-param>
<!-- 配置Spring的用于解决懒加载问题的过滤器 -->
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>OpenSessionInViewFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<!-- 一定要配置在struts2的过滤器之前-->
<!-- 配置struts2的核心过滤器 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
最新文章
- python table转空格
- C语言的内存分配
- 动态linq to list排序
- 【python】求水仙数
- memcache运维整理
- Backward Digit Sums(暴力)
- mysql 存储过程 游标的使用 与定义
- Openfire开发广播服务接口,支持离线广播消息
- 初学Python(三)——字典
- insert时报Cannot add or update a child row: a foreign key constraint fails (`yanchangzichan`.`productstatusrecord`, CONSTRAINT `p_cu` FOREIGN KEY (`cid`) REFERENCES `customer` (`cid`))错误
- ImageLoader配置(凝视)
- 设计模式系列之单例模式(Singleton Pattern)
- raft共识算法
- Tomcat部署实战
- 叶亚明:合格CTO的六要素(转)
- markdown中自己偶尔需要的小技巧
- AJPFX外汇的常见形态
- 继承 多态 java相关基础知识
- Redis Java连接操作
- Asp.net Mvc5的认识
热门文章
- Mongoose 表实例
- TextBox取不到值及其TextBox取不到js赋的值
- 鼠标放在预览图a.gif上,旁边有放大图出现
- jsp和java获取文件或路径
- nslookup命令详解【转】
- C#Json转Xml格式数据的方法
- Codeforces Gym101063 C.Sleep Buddies (2016 USP-ICMC)
- 关于asp.netCore3.0区域和路由配置
- AbstractAdvisingBeanPostProcessor---spring aop 处理器
- [置顶]
 zabbix告警信息-lykchat信息发送系统