일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
Tags
- 리팩터링
- 변경
- 안드로이드 스튜디오
- python
- CodeUP
- spring boot
- 예제
- r
- 안드로이드
- 코드업
- 방법
- 설치
- 반복문
- 시작
- 버튼 이벤트
- 에러
- 설정
- 파이썬
- JDK 8
- 2차원 리스트
- 자바스크립트
- 27G2
- JavaScript
- 안스
- Android Studio
- java
- 맛집
- 출력
- 자바
- 점심
Archives
- Today
- Total
목록JAVA/Spring Boot (9)
기루 기룩 기록
[JAVA] Response - Null 제외(@JsonInclude)
@JsonInclude 어노데이션을 사용해 Response에 포함될 필드를 설정할 수 있다. Include.ALWAYES.. 등과 함께 사용한다. public static enum Include { ALWAYS, NON_NULL, NON_ABSENT, NON_EMPTY, NON_DEFAULT, CUSTOM, USE_DEFAULTS; private Include() { } } 예시 import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @JsonInclude(Include.NON_NULL) public class CategoryResponseModel { pr..
JAVA/Spring Boot
2021. 12. 9. 13:42
[Rest] @JsonIgnore @JsonProperty
@JsonIgnore: Response에 해당 필드가 제외된다 @JsonProperty: Response에 해당 속성의 이름이 변경된다 @Getter @Setter public class ResponseModel { private String data; private boolean result; @JsonProperty("errorMessage") private String errorMsg; @JsonIgnore private Integer errorCode; } RESPONSE { "data":"response data------", "result":false, "errorMessage":"errorrrrr" }
JAVA/Spring Boot
2021. 10. 19. 11:25