本系列博文包含 h5全栈 java全栈Python基础、前端开发、Web框架、缓存以及队列等,希望可以给正在学习编程的童鞋提供一点帮助!!!

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")
posted on 2019-08-23 10:21  李俊互联网技术传播者  阅读(548)  评论(0编辑  收藏  举报