码迷,mamicode.com
首页 > 数据库 > 详细

Error creating bean with name 'sqlSessionFactory' defined in class path resource 报错解决

时间:2020-06-13 19:34:34      阅读:582      评论:0      收藏:0      [点我收藏+]

标签:log   bean   参考   actor   tin   apach   frame   source   com   

报错:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory‘ threw exception; nested exception is java.io.FileNotFoundException: class path resource [mybatis/SqlMapConfig.xml] cannot be opened because it does not exist

技术图片

 

 

 

解决:

在    Application 上加注解:

1 @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})

技术图片

 

 

 

 

参考文档:

https://www.cnblogs.com/shifu8005/p/9873271.html

 

Error creating bean with name 'sqlSessionFactory' defined in class path resource 报错解决

标签:log   bean   参考   actor   tin   apach   frame   source   com   

原文地址:https://www.cnblogs.com/whycai/p/13121230.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!