CircleSmart的个人博客

一步一个脚印

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

2017年4月9日 #

摘要: hibernate中Criteria的完整用法 Criteria 是一个完全面向对象,可扩展的条件查询API,通过它完全不需要考虑数据库底层如何实现、SQL语句如何编写,是Hibernate框架的核心查询对象。 1,Criteria Hibernate 设计了 CriteriaSpecificati 阅读全文
posted @ 2017-04-09 16:49 circlesmart 阅读(182) 评论(0) 推荐(0) 编辑

摘要: Hibernate4 与 spring3 集成之后, 如果在取得session 的地方使用了getCurrentSession, 可能会报一个错:“No Session found for current thread”, 这个错误的原因,网上有很多解决办法, 但具体原因的分析,却没有多少, 这里转 阅读全文
posted @ 2017-04-09 16:42 circlesmart 阅读(423) 评论(0) 推荐(0) 编辑

摘要: 1、通过RequestAware,SessionAware,ApplicationAware获取: 在Struts2中不能直接访问Request,Session,Application元素,但是可以使用Struts2中提供的RequestAware,SessionAware,ApplicationA 阅读全文
posted @ 2017-04-09 14:13 circlesmart 阅读(250) 评论(0) 推荐(0) 编辑