报错信息:Invalid bound statement (not found):  找不到绑定的mapper

解决步骤

看target 目录下是否存在mapper.xml 文件,如果不存在的话,应该是因为你的mapper.xml是放在java文件夹下,而不是resources目录下。这就需要在pom.xml文件下配置resources

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

相关文章:

  • 2021-04-10
  • 2021-11-26
  • 2021-05-16
  • 2021-12-26
  • 2021-09-01
  • 2021-09-02
  • 2022-12-23
  • 2021-09-27
猜你喜欢
  • 2022-01-15
  • 2021-08-07
  • 2022-12-23
  • 2021-04-17
  • 2021-05-19
  • 2021-08-27
  • 2021-09-07
相关资源
相似解决方案