springBoot和MyBatis整合中出现SpringBoot无法启动时处理方式
在springBoot和Myatis 整合中出现springBoot无法启动 并且报以下错误
Description:
Field userMapper in cn.lijun.controller.UserController required a bean of type 'cn.lijun.mapper.UserMapper' that could not be found.
Action:
Consider defining a bean of type 'cn.lijun.mapper.UserMapper' in your configuration.
解决方法是:
在启动类上添加注解
@MapperScan(basePackages = "cn.lijun.mapper")
本系列博文包含H5全栈 java全栈 Python基础、前端开发、Web框架、缓存以及队列等,希望可以给正在学习编程的童鞋提供一点帮助!!!