随笔 - 355  文章 - 0  评论 - 3  阅读 - 62910

(关于创建时用com/example和com.example导致的mapper包对应不上)org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.mapper.EmpMapper.list

日志输出:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.mapper.EmpMapper.list] with root cause

 报错原因:找不到对应的映射文件

我看了很久,我的包都是对上的,不知道为什么报找不到的错误,,结果我发现虽然这里显示的都是一模一样的名字

但是!!第一个是这样子创建出来的 com/example/mapper  我哭死

二第二个是这样子创建的com.example.mapper,所以说这两个能够同时出现说明这两者完全不一样,一定要用路径来创建,不可以用com.来写

写这个

 

 更改前后target的变化:

错误运行的tartget结构

正确运行的target结构

 控制台日志输出正常

 

posted on   201812  阅读(81)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
历史上的今天:
2022-10-11 HttpSession对象 的学习
2022-10-11 Cookie的创建发送获取、存活时间、存中文、重名和路径问题
2022-10-11 IDEA jsp 写Java脚本的时候不能使用out.print()问题
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示