报错如下
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentDao' defined in file [E:\IDEAWorkplace\Drive\target\classes\com\luoda\dao\Impl\StudentDao.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
错误截图
解决方案 :
dao层实现类需继承 HIbernateDaoSupport类 并且内部需指定SessionFactory