hibernate根据主键查询内容
DAO层类继承HibernateDaoSupport之后查询主键的方式
?
1、使用load方法this.getHibernateTemplate().load(Device.class,primaryKey);2、使用get方法this.getHibernateTemplate().load(Device.class,primaryKey);
备注:如果提供的主键不能查询到数据,load方法会报错,提示查询不到数据