Caused by: java.lang.RuntimeException: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.prettylearn.pretty.users.dao.PermissionMapper.selectByPageAndSelections
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.prettylearn.pretty.users.dao.PermissionMapper.selectByPageAndSelections
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:225)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:48)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:65)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58)
出现以上错误的原因,本质是因为dao接口,与mapper中的xml对应不是引起,问题出现时,有可能是由于书写错误导致,有可能是打包的时候,没有将相应的.xml打包进去,当出现未打包成功时,解决方法,如下
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.yml</include>
<include>**/*.ini</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>