首页 > 编程语言 > 详细

springBoot和MyBatis整合中出现SpringBoot无法启动时处理方式

时间:2019-08-23 10:32:17      阅读:386      评论:0      收藏:0      [点我收藏+]

在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")

springBoot和MyBatis整合中出现SpringBoot无法启动时处理方式

原文:https://www.cnblogs.com/lijun6/p/11398453.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!