AreaDaoTest测试时出错

来源:2-7 验证Dao

白石溪

2019-03-18

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘areaDao’ defined in file [D:\Bishe\shoolMall\target\classes\com\fcx\shoolMall\dao\AreaDao.class]: Cannot resolve reference to bean ‘sqlSessionFactory’ while setting bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘sqlSessionFactory’ available
在进行AreaDaoTest测试时,报无法创建bean的错误,请问是为什么,求解答

写回答

1回答

白石溪

提问者

2019-03-18

//img.mukewang.com/szimg/5c8f10600001834006730395.jpg在配置sqlSessionFactory时,id错误写为了SqlSessionFactory和4中value值不对应导致的错误

1
0

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程