报错信信息如下

SSM整合org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误

错误原因,是没有加载上mapper.xml文件,可以去targer目录里查看

SSM整合org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误

解决方法,我们需要在pom.xml文件中,添加如下配置,可以加载xml文件中的配置

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

</build>

 

 

 

 

相关文章:

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