OpenSessionInViewFilter的配置
2016-03-24 13:53
417 查看
<pre name="code" class="html"><pre name="code" class="html">OpenSessionInViewFilter是一个不错的解决因hiberante session 关闭 而懒加载不能正常使用的方法
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:web_spring.xml</param-value> </context-param> <filter> <filter-name>openSession</filter-name> <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>openSession</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
相关文章推荐
- Linux之sed详解
- bash常用快捷键
- tomcat系统部署
- 设置linux系统java参数
- 【shell编程基础0】bash shell编程的基本配置
- linux下使用Qt库进行开发心得
- centos 6.X系统里的网卡em1还原为eth0
- org.apache.commons.lang.StringUtils(StringUtils工具类的常用方法)
- OpenCV边缘检测的详细参数调节
- Docker网络管理
- tomcat应用部署
- centos下如何停止ping命令
- Linux驱动开发-8、中断分层机制_软中断
- tomcat单机多实例部署
- Bash的基本功能
- didFinishLaunchingWithOptions参数launchOptions内容
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误解决方法
- Hadoop之hive的drop table恢复
- linux(centos7)+apache+php7 安装教程
- oop典型应用:实体类