If you're using Spring Boot 1.3, you can configure serialisation inclusion via application.properties:

spring.jackson.serialization-inclusion=non_null

Following changes in Jackson 2.7, Spring Boot 1.4 uses a property named spring.jackson.default-property-inclusion instead:

spring.jackson.default-property-inclusion=non_null

See "Customize the Jackson ObjectMapper" section in Spring Boot documentation.

If you're using an earlier version of Spring Boot, the easiest way to configure serialisation inclusion in Spring Boot is to declare your own, appropriately configured Jackson2ObjectMapperBuilder bean. For example:

@Bean
public Jackson2ObjectMapperBuilder objectMapperBuilder() {
    Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
    builder.serializationInclusion(JsonInclude.Include.NON_NULL);
    return builder;
}