mybatis中`resultType`返回值为`java.util.Map`返回结果字段值为null的字段会直接不显示怎么办
mybatis中resultType返回值为java.util.Map返回结果字段值为null的字段会直接不显示怎么办?mybatis:mapper-locations: classpath:/mapper/*.xmlconfiguration:map-underscore-to-camel-case: truecall-setters-on-nulls: true #mybatis返回类型为ma
·
mybatis中resultType
返回值为java.util.Map
返回结果字段值为null的字段会直接不显示怎么办?
mybatis:
mapper-locations: classpath:/mapper/*.xml
configuration:
map-underscore-to-camel-case: true
call-setters-on-nulls: true #mybatis返回类型为map返回字段值为null的字段
配置一下mybatis的配置文件即可
call-setters-on-nulls: true #mybatis返回类型为map返回字段值为null的字段
将call-setters-on-nulls
改为true即可
更多推荐
所有评论(0)