版权声明:@徐小冠 https://blog.csdn.net/weixin_42114097/article/details/82772662
这是前台post的数据,有着大量的null的数据,不雅观,可以在 配置文件中对结果集进行过滤,
解决办法很简单,在application.yml中添加一行配置,json处理时忽略空值:
在Application.yml 中加入
server:
port: 8083
spring:
application:
name: search-service
data:
elasticsearch:
cluster-name: elasticsearch
cluster-nodes: 192.168.66.128:9300
jackson:
default-property-inclusion: non_null
过滤不必要的 结果为 null的结果