maven-ssm-mapper

2023-03-01 19:08:16 浏览数 (1)

世界上本也不存在”银弹”,一套框架解决不了所有问题——月落

异常:

Invalid bound statement (not found): com.dream.ssm.mapper.ItemsMapperCustom.

问题:

找不到mapper,mapper.xml文件没有编译到应用服务器

解决:
代码语言:javascript复制
<resources>
  <resource>
    <directory>src/main/resources</directory>
    <includes>
      <include>**/*.properties</include>
      <include>**/*.xml</include>
      <include>**/*.tld</include>
      <include>**/*.jsp</include>
    </includes>
    <filtering>true</filtering>
  </resource>

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

因为在src/main/resources和src/main/java中都有mapper.xml文件,把上述代码加在pom.xml中的build中

xml

0 人点赞