背景 mapper的返回类型为map,当查询结果为空时,此列不会插入到map中。 解决方式 在配置文件中添加 # application.yml mybatis: configuration: call-setters-on-nulls: true