异常信息
org.mybatis.spring.MyBatisSystemException:
nested exception is org.apache.ibatis.executor.ExecutorException:
A query was run and no Result Maps were found for the Mapped Statement 'com.xxx.statistic.reports.mapper.WebsiteBaseDataMapper.companyRecruitStatistic'.
It's likely that neither a Result Type nor a Result Map was specified.
Caused by: org.apache.ibatis.executor.ExecutorException:
A query was run and no Result Maps were found for the Mapped Statement 'com.xxx.statistic.reports.mapper.WebsiteBaseDataMapper.companyRecruitStatistic'.
It's likely that neither a Result Type nor a Result Map was specified.
原因
其实报错并不可怕,根据异常信息去排查即可
原因很简单,根据错误信息很容易猜到:
xml映射文件的这个方法,没有配置查询结果类型,也没配置返回结果的映射
解决
指定查询结果类型 resultType,即可解决。