Add these few sentences to the configuration file.
spring: jackson: default-property-inclusion: non_null