A component required a bean of type ‘…Mapper‘ that could not be found问题解决

错误如图
图片[1] - A component required a bean of type ‘…Mapper‘ that could not be found问题解决 - MaxSSL

第一步 查看配置文件是否正确

图片[2] - A component required a bean of type ‘…Mapper‘ that could not be found问题解决 - MaxSSL
第二步 查看标签是否正确
检查UserMapper上是否加上@Mapper
图片[3] - A component required a bean of type ‘…Mapper‘ that could not be found问题解决 - MaxSSL

补充第二步还是不行的话查看下POM文件是否导入mybatis-plus-boot-starter

配置mybatis-plus.mapper-locations无提示信息;
此时发现右上角出现感叹号,Cannot resolve configuration property ‘mybatis-plus.mapper-locations’,强行敲完,启动报错。
如图所示
图片[4] - A component required a bean of type ‘…Mapper‘ that could not be found问题解决 - MaxSSL

检查pom文件,发现未引入包:mybatis-plus-boot-starter

<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.3.2</version></dependency> 

欢迎补充

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享