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)
出現(xiàn)以上錯誤的原因旗芬,本質(zhì)是因為dao接口,與mapper中的xml對應(yīng)不是引起儒喊,問題出現(xiàn)時赂弓,有可能是由于書寫錯誤導致氯夷,有可能是打包的時候,沒有將相應(yīng)的.xml打包進去,當出現(xiàn)未打包成功時位迂,解決方法唯蝶,如下
<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>