org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘com

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.itheima.Mybatisplus01QuickstartApplicationTests': Unsatisfied dependency expressed through field 'userMapper': No qualifying bean of type 'com.itheima.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

除了常见的mapper的bean无法注入问题,经过三小时的不懈查找,springboot 3.x的版本和老版本

mybatis-plus-boot-starter无法匹配,作为小白就不深扒原理了,如果你的springboot版本和我一样是3.1.x版本,把mybatis-plus-boot-starter换成更新新版本


       com.baomidou
       mybatis-plus-boot-starter
      3.5.3.1

你可能感兴趣的:(java,spring,boot,mybatis)