Invalid bound statement (not found): com.test.mapper.ItemsMapper.selectItems

分析原因

如下图,因为idea默认只会扫描resources目录下xml的文件,所有java目录下ItemsMapper.xml没有被扫描到,导致Invalid bound statement (not found): com.test.mapper.ItemsMapper.selectItems
Invalid bound statement (not found): com.test.mapper.ItemsMapper.selectItems_第1张图片

解决办法

在pom文件中,增加一下配置

		<resources>
      <resource>
        
        <directory>src/main/javadirectory>
        <includes>
          <include>**/*.xmlinclude>
        includes>
        <filtering>truefiltering>
      resource>
    resources>

Invalid bound statement (not found): com.test.mapper.ItemsMapper.selectItems_第2张图片

你可能感兴趣的:(遇到的问题,Mac开发,java-ee,spring,java)