当前使用版本(必填,否则不予处理)

mybatis-plus-boot-starter 3.5.2

该问题是如何引起的?(确定最新版也有问题再提!!!)

springboot从2.7.4升级到最新版3.0.0-M5后

重现步骤(如果有就写完整)

springboot为2.7.4时,项目一切正常,今天将springboot升级到最新版3.0.0-M5后启动报错

报错信息

2022-10-26 00:22:11.824 [ERROR][restartedMain][org.springframework.boot.SpringApplication(reportFailure:841)] Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'examController': Unsatisfied dependency expressed through field 'examService': Error creating bean with name 'examServiceImp': Unsatisfied dependency expressed through field 'baseMapper': No qualifying bean of type 'com.example.demo.exam.mapper.ExamMapper' 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.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:743) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:723)

Comment From: linghengqian

  • Duplicate of https://github.com/baomidou/mybatis-plus/pull/4870 , you need to specify the snapshot version of https://oss.sonatype.org/content/repositories/snapshots/ for both mybatis and mybatis-plus.

  • This issue should be marked invalid and closed.

Comment From: shuaizai88

3.5.2.7-SNAPSHOT 升级这个版本