mybatis-plus运行自己写的SQL mapper接口时报错:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.li.demo.mapper.SysMenuMapper.menu
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.<init>(MybatisMapperMethod.java:51)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.lambda$cachedInvoker$0(MybatisMapperProxy.java:111)
.......................
首先根据官网的错误提示:
出现 Invalid bound statement (not found) 异常
并不能解决我的问题,然后翻了众多博客
https://blog.csdn.net/wwrzyy/article/details/86034458
https://blog.csdn.net/qq_38401333/article/details/106242601
https://www.jianshu.com/p/0f5557fe0d8f
也是不行,最终在一个博客中(地址找不见了)找到解决方法
如果你的mapper.xml文件在resource文件下,请建立和java一样的文件层级
问题解决。如果有什么不对的地方欢迎各位大神指正!!!