mybatis警告: No MyBatis mapper was found in ‘[com.**]‘ package. Please check your configuration.
作者:mmseoamin日期:2023-12-20

出现的错误No MyBatis mapper was found

mybatis警告: No MyBatis mapper was found in ‘[com.**]‘ package. Please check your configuration.,第1张

 

 解决办法:

mybatis警告: No MyBatis mapper was found in ‘[com.**]‘ package. Please check your configuration.,第2张

 在你的启动类上加上 MapperScan 注解,里面写上你的dao 目录,如果存在多个可以使用 * 号代替,或者在中括号中使用 逗号隔开写多个比如:

mybatis警告: No MyBatis mapper was found in ‘[com.**]‘ package. Please check your configuration.,第3张

 使用mybatis的话需要在 application.yml 或application.peoperties 文件里 使其项目加载的时候加载到mybatis 配置文件

mybatis警告: No MyBatis mapper was found in ‘[com.**]‘ package. Please check your configuration.,第4张