错误:java.lang.IllegalArgumentExcept:Property ‘sqlSessionFactory‘ or ‘sqlSessionTemplate‘ are required

博主在阿里云VOD上传视频时遇到一个未开源的Jar包,尝试手动将其添加到Maven仓库,因命名错误导致Spring Boot应用启动异常。错误信息显示'sqlSessionFactory'或'sqlSessionTemplate'属性缺失。解决方案是删除错误的依赖文件夹,问题得到解决。
摘要由CSDN通过智能技术生成

先说结论:博主是因为手动向maven仓库中添加jar包的时候,有错误,把错误的依赖的文件夹删除即解决。

今天向阿里云vod中上传视频的时候,有一个jar包阿里没有开源,需要手动引入,我在向maven中添加jar包的时候,jar包的名字打错了,导致文件夹的名字和jar包的名字不匹配,然后晚上的时候,一开始有一个模块都启动起来的,再启动其他模块,就报这个错误,然后把启动起来的模块停止再重启,也不行了,所以我认为肯定不是代码的问题,经过查找,看到有人说可能是jdk的jar包问题,我也动过jdk就想到了我动过maven,果然,一删除就正常了


Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eduChapterMapper' defined in file [F:\wmjava\guli_school\target\classes\com\wm\eduService\mapper\EduChapterMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1794)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1307)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)
	... 33 common frames omitted
Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
	at org.springframework.util.Assert.notNull(Assert.java:201)
	at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:122)
	at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73)
	at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790)
	... 43 common frames omitted
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值