mybatis设置Map空值返回

mybatis时,设置Map返回,当值为空时属性也会没有

在application.properties中加入下面配置,将会解决这个问题。

#当查询数据为空时字段返回为null,不加这个查询数据为空时,字段将被隐藏
mybatis.configuration.call-setters-on-nulls=true

原文地址:https://www.cnblogs.com/telwanggs/p/11386747.html