아틴
Atin
아틴
전체 방문자
오늘
어제
  • 분류 전체보기 (460)
    • Devlopment (246)
      • 정리 글 (20)
      • MicroServices (0)
      • Reactive, Concurrenc.. (12)
      • Java (44)
      • Spring (20)
      • C,C++,Ruby,Python (52)
      • Mobile (39)
      • Web (35)
      • Tip & Info (14)
      • Unit Test (7)
    • Infra (44)
      • OS (21)
      • RDBMS (13)
      • NoSQL&Cache (5)
      • AWS (4)
    • Computer Science (11)
    • Etc (156)

블로그 메뉴

  • Home
  • Guestbook

공지사항

인기 글

태그

  • Ruby on Rails
  • 여행
  • 던젼 앤 드래곤즈
  • C
  • javascript
  • Android
  • Python
  • TRPG
  • 정읍
  • jsp
  • 자바
  • 안드로이드
  • mysql
  • 전라도
  • Linux
  • 해킨토시
  • CSS
  • 아이폰
  • Dungeons & Dragons
  • Java

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
아틴

Atin

Devlopment/Spring

Jackson에서 null string 안 보이게 설정

2016. 8. 12. 10:52
반응형



아래와 같이 사용을 하려했지만 Deprecated 되었다.


 @JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)


찾아보니 2. 대에서 사용법이 바뀐듯한데

아래와 같이 사용을 하면 된다.


mapper.setSerializationInclusion(Include.NON_NULL);


또는


@JsonInclude(Include.NON_NULL)
class Foo
{
  String bar;
}



반응형
저작자표시 비영리 변경금지 (새창열림)

'Devlopment > Spring' 카테고리의 다른 글

Spring에서 Webjars 사용하기  (0) 2017.02.20
[Spring Security] 필터 Filter, SecurityFilterChain 이해하기  (1) 2017.02.08
[SpringSecurity] Method 레벨에서 AccessDeniedException 처리하기  (0) 2017.02.07
Spring Security custom expression  (0) 2017.02.01
Spring Security 관련 레퍼런스 정리  (0) 2017.02.01
JPA Hibernate 사용 중 ORA-00001: 무결성 제약 조건( ORA-00001 에러  (0) 2016.06.07
Spring에서 기본적인 component-scan 설정  (0) 2016.05.23
Spring에서 Pageable, Valid 설정 유의 설정  (0) 2016.05.23
QueryDSL  (0) 2016.05.17
Hibernate Dialect (ORA-00933 Pagable error)  (0) 2016.05.17
    'Devlopment/Spring' 카테고리의 다른 글
    • Spring Security custom expression
    • Spring Security 관련 레퍼런스 정리
    • JPA Hibernate 사용 중 ORA-00001: 무결성 제약 조건( ORA-00001 에러
    • Spring에서 기본적인 component-scan 설정
    아틴
    아틴

    티스토리툴바