HappyWeasel

Spring Boot - DTO에서 null인 field는 json에서 빼기 본문

Back-End/Spring

Spring Boot - DTO에서 null인 field는 json에서 빼기

HappyWeasel 2021. 2. 9. 16:26
public class MyDto {

    @JsonInclude(Include.NON_NULL)
    private String stringValue;

    private int intValue;

    // standard getters and setters
}

 

참고 : www.baeldung.com/jackson-ignore-null-fields

Comments