用户登录成功后
Employee employee=employeeService.find(employeeForm.getUsername());
ServletActionContext.getRequest().getSession().setAttribute("employee", employee);
(以上方式保存session后其他页面只要一用就报以下异常)
org.hibernate.LazyInitializationException: could not initialize proxy - no Session但是如果我在两段代码中间插入一条输入语句以上异常就不存在了。。
Employee employee=employeeService.find(employeeForm.getUsername());
System.out.println(employee.getRealname());
ServletActionContext.getRequest().getSession().setAttribute("employee", employee);
我都快郁闷死了,求大牛解答下谢谢了....sshsessionjava
Employee employee=employeeService.find(employeeForm.getUsername());
ServletActionContext.getRequest().getSession().setAttribute("employee", employee);
(以上方式保存session后其他页面只要一用就报以下异常)
org.hibernate.LazyInitializationException: could not initialize proxy - no Session但是如果我在两段代码中间插入一条输入语句以上异常就不存在了。。
Employee employee=employeeService.find(employeeForm.getUsername());
System.out.println(employee.getRealname());
ServletActionContext.getRequest().getSession().setAttribute("employee", employee);
我都快郁闷死了,求大牛解答下谢谢了....sshsessionjava
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货