Spring Boot:Caused by: org.apache.ibatis.binding.BindingException: Parameter 'deptId' not found.

1. 错误信息描述

在使用Spring Boot + Mybaits从前台向后台提交数据时,控制台报出该错误信息

2. 报错原因

在dao接口中,该方法拥有两个参数,Mybaits无法区分这两个参数

3. 解决方法

在dao方法中为这两个参数分别标注Mybaits的@Param注解,对这两个参数加以区分

    List<ManagerSelectResult>selectToday(@Param("deptId") Integer deptId, @Param("officeId") Integer officeId);

  

原文地址:https://www.cnblogs.com/huiAlex/p/9310117.html