解决mybatis返回map时value值为null没有对应的key
spring boot在配置文件中:
mybatis.configuration.call-setters-on-nulls=true
使用mybatis.xml 配置文件时,如下设置:
<configuration>
<settings>
<!-- 在null时也调用 setter,适应于返回Map,3.2版本以上可用 -->
<setting name="callSettersOnNulls" value="true"/>
</settings>
</configuration>