【实战问题】【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

【实战问题】【14】org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxMapper'

原文地址:https://www.cnblogs.com/huashengweilong/p/11380127.html

时间: 2024-11-04 10:11:13

【实战问题】【14】org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxMapper'的相关文章

org.springframework.beans.factory.BeanCreationException: Error creating bean with name

这个问题在别人电脑上面没有出现,但我的电脑就出现了,在网上找各种解决方法:有的说是asm.jar冲突,有的说要配置byName,有的说是路径问题但路径明显是正确的. 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.B

【报错】org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSocketHandlerMapping' defined in class path resource

环境:maven+eclipse+jdk1.8 [tomcat使用的是maven自带的插件,实质原因就是出在tomcat版本问题] 背景:在进行SSM集成WebSocket的时候,项目启动报org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSocketHandlerMapping' defined in class path resource错误,详细如下 org.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory'

spring整合mybatis的时候,传统dao模式test报错 发现是在pojo类user对应的user.xml中配置路径写错了 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init m

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exc

错误/异常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/beans_common.xml]...的解决方法

1.异常/错误视图 错误/异常描述:sessionFactory 初始化失败. 说明:我用的是SSH框架.JDK-1.8:Tomcat-7.0 我用到的jar包: 2.解决方法 我 出现在这个问题的原因是:jar包的问题(应该是冲突),我删除了hibernate-core-4.1.12.Final.jar这个jar包,问题就解决了. 其他原因: 1.保证jar包没有问题的情况下,还出现这个问题,那么就是你的Spring配置文件配置错了,请仔细检查,改回来即可. 2.保证jar包没有问题,Spri

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext之解决办法

错误产生背景:将之前用Eclipse写的Blog项目迁移到Idea上面.Ecilpse项目一直是没有问题的. 错误原因分析:原因是项目依赖中引入的jpa,另外也与Idea比较智能也有关系 解决办法: 第一,在启动类中加上如下注解代码 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,JpaRepositoriesAutoConfiguration.class,HibernateJpaAutoConfigurat

spring测试出错:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0':

解决办法 这里找不到根路径,也就找不到Spring-config.xml的配置,所以加上更改根路径的注解@WebAppConfiguration(“src/main/resources”)就解决了 1 @RunWith(SpringJUnit4ClassRunner.class) 2 @WebAppConfiguration("src/main/resources") //加上这个注解完美解决 3 @ContextConfiguration(locations = {"cla

启动项目报错:org.springframework.beans.factory.UnsatisfiedDependencyException

dubbo项目: 启动项目报错:(web端) org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.facto

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [dx.service.ItemService] found for dependency

在整合ssm框架,测试service层的时候报错 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [dx.service.ItemService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dep