mybatis-plus报错org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean

解决方法是在这里插入图片描述
启动类增加MapperScan注解,然后usermapper接口加注释@Repository或@Mapper如下
在这里插入图片描述
解决问题!
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘getFilterFactoryBean’ defined in class path resource [com/jzy/config/ShiroConfig.class]: Unsatisfied dependency expressed through method ‘getFilterFactoryBean’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘securityManager’ defined in class path resource [com/jzy/config/ShiroConfig.class]: Unsatisfied dependency expressed through method ‘getDefaultWebSecurityManager’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userRealm’: Unsatisfied dependency expressed through field ‘userService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘IUserService’: Unsatisfied dependency expressed through field ‘baseMapper’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.jzy.mapper.UserMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1179) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.2.jar:5.3.2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.2.jar:5.3.2]

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 根据你提供的引用内容,出现这个错误是因为Spring应用程序上下文启动失败,具体的错误信息是`org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper'`。中给出了解决方法,可能是因为在依赖中同引入了MybatisMybatis-plus,导致冲突。你可以尝试解决冲突,选择其中一个依赖来使用。同,还要检查父模块是否已经引入了Mybatis依赖,而后在本模块又引入了Mybatis-plus模块,这种情况也可能会导致冲突。希望这些信息对你有帮助。123 #### 引用[.reference_title] - *1* [springBoot 启动之后报错Unsatisfied dependency expressed through field ‘baseMapper’](https://blog.csdn.net/borderhz/article/details/117173034)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item] - *2* *3* [org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean](https://blog.csdn.net/Faker_News/article/details/111710850)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值