报错信息
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'deity' in 'class com.pojo.Dept'
//异常映射,反射异常
报错代码
DeityMapper3.xml配置:<collection property="deity" ofType="deity">
Dept类:private List<Deity> deities;
错误分析
在Dept类找不到这个property named 'deity'
Dept类属性是:deities DeityMapper3.xml配置是:deity 不匹配
解决方案
DeityMapper3.xml配置:<collection property="deities" ofType="deity">
Dept类:private List<Deity> deities;//两边要保持一致