hibernate4以后,DataSource从hibernate配置中读取配置会报错,要直接写在spring配置文件中。spring3.1不再有hibernateDaoSupport,在dao层不能继承HibernateDaoSupport,只能显式声明SessionFactory,并且设置get/set方法。
不确定的说:在hibernate4以后,session管理变动较大,spring也变了,所以DataSource要在applicationContext.xml里面配置。
参考:http://blog.csdn.net/ares1201/article/details/8664956