mapper上显示@MapKey is required mapper中方法 public List<Map<String,String>> list(); 以下SQL:select id,name,age from test; 报红,并且强校验检测无法通过,显示@MapKey is required,是因为map是键值对存在,语句返回无法定位map的key值。 解决:使用注解@MapKey(value=“id”),指出key值,解决。