springBoot+mybatis plus项目测试类无法注入bean

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容

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

我的解答思路和尝试过的方法

①包名是一致的

img


②有扫描mapper

img


③版本也没问题

img


img

我想要达到的结果

首先扫描路径到com.example.mybatisplus目录即可,另外,UserMapper接口上要添加@Mapper注解