@ManyToOne(fetch = FetchType.LAZY)出现懒加载异常:org.hibernate.LazyInitializationException: could not initialize proxy - no Session我以为是我配置问题,测试了好久,发现问题所在:我使用springsecurity,服务器启动就注入baseDao查询,因为不是通过request查询,spring就不能管理session的范围,web.xml配置的OpenSessionInViewFilter就没有起作用,其实,除了这2个人员角色,角色资源实体懒加载无效外,进去系统只用用reques Read More
posted @ 2012-09-23 20:18 七郎 Views(670) Comments(0) Diggs(0) Edit