No MyBatis mapper was found in ‘[xx.mapper]‘ package. Please check your configuration
生活随笔
收集整理的這篇文章主要介紹了
No MyBatis mapper was found in ‘[xx.mapper]‘ package. Please check your configuration
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
spring boot集成mybatisplus搭建項目,在只有spring boot時訪問正常,集成后,啟動項目控制臺報錯如標題:MyBatis: No MyBatis mapper was found in '[xx.mapper]' package. Please check your configuration。
解決方案:把啟動類上的掃描mapper的注解@ComponentScan(basePackages = {"com.example.exam.mapper"})改為@MapperScan(basePackages = {"com.example.exam.mapper"})后,重啟項目,發現項目正常
總結
以上是生活随笔為你收集整理的No MyBatis mapper was found in ‘[xx.mapper]‘ package. Please check your configuration的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SSM实现定时任务的两种方式
- 下一篇: spring boot+mybatisp