HTTP Status 500 – Request processing failed; nested exception is org.apache.ibatis.binding.BindingEx

HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.wanshi.mapper.EmployeeMapper.list

问题描述

在这里插入图片描述

该错误是大致意思就是mapper.xml文件绑定失败,导致该问题的原因是因为拦截了xml文件,导致MyBatis绑定xml文件失败

这破错误,找了半天,改了半天,依旧报这个错,最后竟是因为项目自动拦截了xml文件,从而导致MyBatis绑定xml文件失败!

解决方法

在pom.xml文件中加入不拦截xml文件,即可完成解决错误,

<build>
    <resources>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
    </resources>
</build>

如果本文对您有帮助的话,不妨给博主(点赞,收藏,关注,评论

遇到任何技术问题均可在评论区评论或私信我,一定解决到位!

遇到任何技术问题均可在评论区评论或私信我,一定解决到位!

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码

)">
< <上一篇
下一篇>>