问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容
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)}
我的解答思路和尝试过的方法
①包名是一致的
②有扫描mapper
③版本也没问题