解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
1.如果maven项目中存放映射文件xml的目录是在src/main/java下的,那么就要格外注意了,因为工程默认情况下是不会扫描src/main/java下的xml文件,下面有两种解决方法:
第一种是把xml文件放在resources目录下;
第二种解决方法是,将src/main/java目录配置到pom.xml文件中,代码如下:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>

浙公网安备 33010602011771号