org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.eduservice.mapper.EduCourseMapper.getCoursePublishVoById

报错:

在用mybatis-plus查询的时候有报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.eduservice.mapper.EduCourseMapper.getCoursePublishVoById

 

 

 解决:

1、复制xm文件夹到target中
2、把xml文件夹放到resources目录中
3、推荐使用:通过配置实现
(1)pom.xml

<build>
  <resources>
      <resource>
          <directory>src/main/java</directory>
          <includes>
              <include>**/*.xml</include>
          </includes>
          <filtering>false</filtering>
      </resource>
  </resources>

</build>

(2)项目application.properties

   mybatis-plus.mapper-locations=classpath:com/**/mapper/xml/*.xml

posted @ 2022-07-03 19:07  莫得感情的肝帝  阅读(23)  评论(0编辑  收藏  举报