首页 > 编程语言 > 详细

spring boot加mybatis使用Map返回值设置

时间:2018-05-18 13:15:34      阅读:904      评论:0      收藏:0      [点我收藏+]

当使用spring boot加mybatis时,设置Map返回,当值为空或是null时,返回的字段不会加载到map中

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

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

spring boot加mybatis使用Map返回值设置

原文:https://www.cnblogs.com/xueershewang/p/9055566.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!