报错信息:
Caused by: java.lang.IllegalArgumentException: Failed to create query for method public abstract com.hrm.domain.company.Department com.hrm.company.dao.DepartmentDao.findByCode(java.lang.String,java.lang.String)! At least 2 parameter(s) provided but only 1 parameter(s) present in query.
代码
错误提示是:至少提供了2个参数,但查询中只存在1个参数。
问题出现在findByCode,将findByCode改成findByCodeAndCompanyId
就可以正常运行了