原因:Mybatis默认如果数据为空的字段,则该字段省略不显示,可以通过添加配置文件,规定查询数据为空是则返回null。
properties配置:
mybatis.configuration.call-setters-on-nulls=true
yml配置:
mybatis:
configuration:
call-setters-on-nulls: true
原因:Mybatis默认如果数据为空的字段,则该字段省略不显示,可以通过添加配置文件,规定查询数据为空是则返回null。
properties配置:
mybatis.configuration.call-setters-on-nulls=true
yml配置:
mybatis:
configuration:
call-setters-on-nulls: true
转载于:https://my.oschina.net/yuantangxi/blog/3083254