java吧 关注:1,261,804贴子:12,761,282
  • 0回复贴,共1

The method getCurrentSession() is the type Session

只看楼主收藏回复

这是怎么回事呢 怎么解决啊 谢谢各位大神
代码一个Dao的实现类
@Repository
public class EmployDaoImpl implements EmployDao {
private SessionFactory se;
public SessionFactory getSe() {
return se;
}
@Autowired
public void setSe(SessionFactory se) {
this.se = se;
}
@Override
public SysEmployee loginDao(SysEmployee s) {
se.getCurrentSession()
. createQuery("from SysEmployee where sn=? and password=? and status='1'")
.setString(0, s.getSnum())
.setString(1, s.getPassword())
.uniqueResult();
return "";
}
}
.getCurrentSession()下面有红线


IP属地:河北1楼2017-08-08 00:40回复