报错:
严重: Servlet.service() for servlet [SpringMVC] in context with path [/CS-Service] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.draeger.dao.ApplicationDao.deleteApplicationByANum] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.dao.ApplicationDao.deleteApplicationByANum
找到问题所在:
- 根据报错的信息,找到出错的文件。
比如我的情况是一个Dao文件的接口“deleteApplicationByANum”报错。
可能的三种原因:
- Dao接口没有写。(你可能在Controller,Service,ServiceImpl,Mapper都写了这个接口,唯独忘记在Dao写了)
- Dao的接口名称与Service,ServiceImpl,Mapping 等…的接口名不一致。(Service,ServiceImpl的接口名都写的beanUpdate(), 在Dao中接口名写成updateBean(),导致绑定异常)
- Dao的接口名称与Service,ServiceImpl,Mapping 等…的返回值不一致。