org.apache.ibatis.binding.BingdingException:Invalid bound statement(not found):com.ty.mapper........

原因是maven打包的时候,没有把XXXmapper.xml 文件编译过来

解决办法:在maven项目的pom.xml添加:

<resources>
	<resource>
	      <directory>src/main/java</directory>
		<includes>
		   <include>**/*.xml</include>
                   <include>**/*.properties</include>
              </includes>
	</resource>
	<!-- <resource>
	    <directory>src/main/resources</directory>
	    <includes>
		<include>**/*.xml</include>
	    </includes>
	</resource> -->
</resources
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页