标签:解决方法 red efi mybatis 添加 mapper bat 错误 注解
在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无法启动时处理方式
标签:解决方法 red efi mybatis 添加 mapper bat 错误 注解
原文地址:https://www.cnblogs.com/lijun6/p/11398453.html