1、查看yml路径配置 mybatis-plus: mapper-locations: classpath*:com/xxxx/laws/mapper/xml/*.xml 2、查看mapper接口的方法和xml定义的id名称是否一致 3、查看maven是否打包xml文件 <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource>