錯誤如圖
第一步 查看配置文件是否正確
第二步 查看標簽是否正確
檢查UserMapper上是否加上@Mapper
補充第二步還是不行的話查看下POM文件是否導入mybatis-plus-boot-starter
配置mybatis-plus.mapper-locations無提示信息;
此時發(fā)現(xiàn)右上角出現(xiàn)感嘆號,Cannot resolve configuration property ‘mybatis-plus.mapper-locations’,強行敲完,啟動報錯。
如圖所示
檢查pom文件,發(fā)現(xiàn)未引入包:mybatis-plus-boot-starter文章來源:http://www.zghlxwxcb.cn/news/detail-569834.html
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.3.2</version>
</dependency>
歡迎補充文章來源地址http://www.zghlxwxcb.cn/news/detail-569834.html
到了這里,關于A component required a bean of type ‘...Mapper‘ that could not be found問題解決的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!