【實戰問題】【14】org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxMapper'


問題:

SpringBoot啟動時報錯:

Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'userDaoMapper' defined in file [E:\WebProject\...

解決方案:

pom.xml文件引入了兩個Mybatis依賴包。一個是整合SpringBoot的,一個是整合Spring的jar包。兩個一起出現,起沖突了,把Spring的Mybatis去掉就可以了

參考博客:

SpringBoot啟動報錯"Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Err" - LinFord1995的博客 - CSDN博客
https://blog.csdn.net/linford1995/article/details/77991482


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 Springboot異常:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController' org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'statisticalMapper' defined in file Redis——解決“org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisReferenceResolver': Unsatisfied dependency expressed through constructor parameter 0” 報錯Error creating bean with name 'orderController': Unsatisfied dependency expressed through field 'orderService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: mybatis Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'homeControll org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.southwind.mmall002.service.Impl.ProductCategoryServiceImplTest': Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'advertiseRestControll org.springframework.beans.factory.UnsatisfiedDependencyException 問題 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'indexServiceImpl': Unsatisfied dependency expressed through field 'indexDao'; nested exception is org.s 【spring boot】使用注解@ConfigurationProperties讀取配置文件時候 報錯 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rocketmqAutoConfiguration': Unsatisfied dependenc
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM