那个transaction怎么在这节的查询没用到,session也没关闭
public static void findStudent(){
Session session =HibernateUtil.getSession();
//找到班级
Grade g = (Grade) session.get(Grade.class, 1);
Set<Student> students = g.getStudents();
for (Student student : students) {
System.out.println(student.getSname()+"," + student.getGender());
}
}