반응형
아래와 같이 사용을 하려했지만 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 |