美文网首页
Invalid bound statement (not fou

Invalid bound statement (not fou

作者: liurongming | 来源:发表于2017-08-13 21:29 被阅读0次

    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>
    

    相关文章

      网友评论

          本文标题:Invalid bound statement (not fou

          本文链接:https://www.haomeiwen.com/subject/otaerxtx.html