真是恨死它了,烦半天!!!!
开始还以为配置出错了找了半天teacherscore .hbm.xml没错,dao也没错,起初不停地部署运行然后在dao里面测试,还好找到问题了,是出现在hql语句上!!!!!
public List<Teacherscore> findAll() {
String queryString = "from teacherscore";
return (List<Teacherscore>)hibernateTemplate.find(queryString);
}
public static void main(String[] args) throws Exception {
ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
TeacherscoreDAO dao = (TeacherscoreDAO)ac.getBean("teacherscoreDAO");
System.out.println("00");
List<Teacherscore> s = dao.findAll();
System.out.println(s);
}
就是出在那个小写的t上改成大写就行了。。。。。。