Hyerin's Logs

  • 홈
  • 태그
  • 방명록

어노테이션 1

[Spring Boot] API 응답에 null 값 포함 안 시키는 어노테이션

@Getter@AllArgsConstructor@NoArgsConstructorpublic class UserDto { @NotNull private Long id; @JsonInclude(JsonInclude.Include.NON_NULL) private String username; @JsonInclude(JsonInclude.Include.NON_NULL) private String email;}@JsonInclude(JsonInclude.Include.NON_NULL) 어노테이션을 사용하면 해당 값이 null일 경우에 json 응답으로 전달하지 않는다.

Software Engineering/[BE] Spring Boot (Java) 2024.06.22
이전
1
다음
더보기
프로필사진

Hyerin's Logs

개발/일상 로그

  • 분류 전체보기 (14)
    • Software Engineering (11)
      • [FE] React.js (0)
      • [BE] Spring Boot (Java) (4)
      • [Infra] Cloud, Server (0)
      • Algorithm (7)
      • Article (0)
    • Daily (3)
      • Log (3)

Tag

build.gradle, h2gis, algorithm, restresult, API, 일상, 알고리즘, 2024년 회고, 버킷리스트, queyrl dsl, jsoninclude, 해싱, Spring Boot, LeetCode, prefix, springboot, 2025년, resterror, hashing, querydsl,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바