博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年4月12日

摘要: 1、beans.xml配置<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocat 阅读全文

posted @ 2013-04-12 23:28 TimeFight 阅读(175) 评论(0) 推荐(0)

摘要: 由于在数据库获取数据采用的是load的方法 只是一个代理对象 则jsp页面用到相关数据才用发出sql语句对数据库进行查询 但等到jsp页面需要数据发出sql语句 这时session已经关了 Spring为此提供了一个拦截器 在jsp页面查询到数据后再将session关闭一、 1、将以下代码复制到web.xml下 <filter> <filter-name>OpenSessionInView</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSess 阅读全文

posted @ 2013-04-12 23:19 TimeFight 阅读(551) 评论(0) 推荐(0)