摘要:
hibernate中Criteria的完整用法 Criteria 是一个完全面向对象,可扩展的条件查询API,通过它完全不需要考虑数据库底层如何实现、SQL语句如何编写,是Hibernate框架的核心查询对象。 1,Criteria Hibernate 设计了 CriteriaSpecificati 阅读全文
2017年4月9日 #
摘要:
Hibernate4 与 spring3 集成之后, 如果在取得session 的地方使用了getCurrentSession, 可能会报一个错:“No Session found for current thread”, 这个错误的原因,网上有很多解决办法, 但具体原因的分析,却没有多少, 这里转 阅读全文
摘要:
1、通过RequestAware,SessionAware,ApplicationAware获取: 在Struts2中不能直接访问Request,Session,Application元素,但是可以使用Struts2中提供的RequestAware,SessionAware,ApplicationA 阅读全文