From 0eaeb2c7929ed085b4694e2ca5e8c82f2c37e236 Mon Sep 17 00:00:00 2001 From: CYY1007 Date: Sun, 8 Oct 2023 22:17:14 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20Fix=20:=20API=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=EC=9D=B4=EC=83=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit result에 null 포함 시 필드 자체 사라지는 버그 수정 --- .../java/zipdabang/server/apiPayload/reponse/ResponseDto.java | 4 ++-- src/main/resources/application.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/zipdabang/server/apiPayload/reponse/ResponseDto.java b/src/main/java/zipdabang/server/apiPayload/reponse/ResponseDto.java index 7fc6e00..9555ae4 100644 --- a/src/main/java/zipdabang/server/apiPayload/reponse/ResponseDto.java +++ b/src/main/java/zipdabang/server/apiPayload/reponse/ResponseDto.java @@ -24,7 +24,6 @@ public class ResponseDto { @Schema(description = "응답 메시지", requiredMode = Schema.RequiredMode.REQUIRED, example = "요청에 성공하였습니다.") private final String message; @Schema(description = "응답 결과", requiredMode = Schema.RequiredMode.REQUIRED, example = "응답 결과") - @JsonInclude(JsonInclude.Include.NON_NULL) private T result; @@ -35,7 +34,8 @@ public static ResponseDto of(T result){ } public static ResponseDto of(BaseCode code,T result){ - return new ResponseDto<>(true, 2000 , code.getReasonHttpStatus().getMessage(), result); + ResponseDto tResponseDto = new ResponseDto<>(true, code.getReasonHttpStatus().getCode(), code.getReasonHttpStatus().getMessage(), result); + return tResponseDto; } // 실패한 경우 응답 생성 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index e50765b..032d138 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -14,7 +14,7 @@ spring: ## # local redis # redis: # host: localhost - +# redis: host: zipdabang-redis.osattk.ng.0001.apn2.cache.amazonaws.com batch: