日志输出: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结构
控制台日志输出正常
- example mapper com BindingException EmpMapperexample mapper com bindingexception empmapper bindingexception bindingexception invalidbound statement found bindingexception ibatisbinding mybatisplus statement bindingexception selectjoball jobmapper statement mybatissystemexception bindingexception parameters bindingexception quot exception statement bindingexception statement invalid mybatis bindingexception studentdao selectlist statement