完美解决: org.apache.ibatis.binding.BindingException Invalid bound statement (not found)

异常描述: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

原因: springboot整合mybatis, 在编译时, 如果不添加此节点mybatis的mapper.xml文件都会被漏掉, 即只会生成mapper对应的class文件, 而不会生成xml文件

解决办法: pom文件添加:

	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.xml</include>
				</includes>
			</resource>
		</resources>
	</build>
posted @ 2019-05-21 17:13  wangzaiplus  阅读(2599)  评论(0编辑  收藏  举报