Invalid bound statement (not found): mybatis.mapper.UserMapper.findUserById

开发工具:idea

如果把xml中放到resource外面(这是老式的写法),比如
Invalid bound statement (not found): mybatis.mapper.UserMapper.findUserById
需要在pom.xml中配置如下内容,不然加载不到配置文件。

<resources>
      <resource>
          <directory>src/main/java</directory>
          <includes>
              <include>**/*.xml</include>
          </includes>
      </resource>
      <resource>
          <directory>src/main/source</directory>
          <includes>
              <include>**/*.*</include>
          </includes>
      </resource>
</resources>
      

Invalid bound statement (not found): mybatis.mapper.UserMapper.findUserById

上一篇:Associations marked as mappedBy must not define database mappings like @JoinTable or @JoinColumn


下一篇:JSON