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

摘要:
组织弹簧框架清洁工厂。BeanCreationException:错误创建名为“qlSessionFactor”的bean定义的术语路径资源[org/mybatis/spring/boot/autoconfig/MybatisAutoConfiguration.class]:

报错:

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

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

解决:

在    Application 上加注解:

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

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

参考文档:

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

免责声明:文章转载自《Error creating bean with name 'sqlSessionFactory' defined in class path resource 报错解决》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇链表的建立移动端css、Js优处理下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

super方法

super方法 super是按照mro顺序来寻找当前类的下一个类 在py3中不需要传参数,自动就帮我们寻找当前类的mro顺序的下一个类中的同名方法 在py2中的新式类中,需要我们主动传递参数super(子类的名字,子类的对象).函数名() 这样才能够帮我们调用到这个子类的mro顺序的下一个类中的方法 在py2的经典类中,并不支持使用super来找下一个类...

day71-CSS-商城导航条示例

商城导航条示例 <body> <!--黑色背景开始--> <div class="c1"> <!--红色背景开始--> <div class="c2 clearfix"><!--class有两个名字--> <...

『MXNet』第十弹_物体检测SSD

全流程地址 一、辅助API介绍 mxnet.image.ImageDetIter 图像检测迭代器, from mxnet import image from mxnet import nd data_shape = 256 batch_size = 32 rgb_mean = nd.array([123, 117, 104]) def g...

一个div有多个class,如何通过xpath获取?

 想要获取所有class=film-col的div 元素 @SuppressWarnings("unchecked")List<HtmlDivision> divs= (List<HtmlDivision>)page.getByXPath("//div[contains(@class, 'film-col')]");...

spring事务注解@Transactional不生效、不回滚原因

一般情况下在方法上直接添加@Transactional即可,但是极有可能会达不到我们想要的效果,这时就需要添加相应的参数,参数如下。 @Transactional(propagation=Propagation.REQUIRED) //控制事务传播。默认是Propagation.REQUIRED  @Transactional(isolation=Iso...

Vue一些基本操作技巧

1.Vue删除data列表中的项 下为异步删除购物车,并清空当前条目 1 cartDel: function(item) { 2 let _this = this; 3 _this.confirm("确认删除吗?", function() { 4 _this.axios.post(cartD...