From d82eec209da1df2b3b2053f8541bc2bdb5c9fbd3 Mon Sep 17 00:00:00 2001 From: YONGWOOK CHOI <60510921+CYY1007@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:06:00 +0900 Subject: [PATCH 1/8] =?UTF-8?q?Ci/252=20relase=20db=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20(#257)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create --- src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c66baa5..67bdaad 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -228,7 +228,7 @@ spring: dialect: org.hibernate.dialect.MySQL8Dialect use_sql_comments: true hbm2ddl: - auto: update + auto: create default_batch_fetch_size: 1000 show_sql: true format_sql: true From a57c69cbbdd138a975d71db11cb2bbc3cf612bc4 Mon Sep 17 00:00:00 2001 From: YONGWOOK CHOI <60510921+CYY1007@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:58:55 +0900 Subject: [PATCH 2/8] =?UTF-8?q?relase=20redis=20=EC=88=98=EC=A0=95=20(#259?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 --- src/main/resources/application.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 67bdaad..854a298 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -213,8 +213,8 @@ spring: enabled: always ## # local redis - redis: - host: zipdabang-release.osattk.ng.0001.apn2.cache.amazonaws.com + redis: + host: zipdabang-release.osattk.ng.0001.apn2.cache.amazonaws.com batch: jdbc: From 7dff961a277fd738a2312e8dbe63158810cdc897 Mon Sep 17 00:00:00 2001 From: YONGWOOK CHOI <60510921+CYY1007@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:48:08 +0900 Subject: [PATCH 3/8] Ci/252 (#261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 --- src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 854a298..2ecc3e9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -228,7 +228,7 @@ spring: dialect: org.hibernate.dialect.MySQL8Dialect use_sql_comments: true hbm2ddl: - auto: create + auto: update default_batch_fetch_size: 1000 show_sql: true format_sql: true From df5526e8de7c5b42a811d815e1939828e6ada2c5 Mon Sep 17 00:00:00 2001 From: YONGWOOK CHOI <60510921+CYY1007@users.noreply.github.com> Date: Tue, 31 Oct 2023 21:23:03 +0900 Subject: [PATCH 4/8] =?UTF-8?q?Ci/252=20=EB=A1=9C=EA=B9=85=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20(#263)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * 로깅 추가 --- .../zipdabang/server/domain/member/Terms.java | 2 +- .../RecipeCategoryRepository.java | 3 +++ .../web/dto/requestDto/MemberRequestDto.java | 15 +++++++++++++++ src/main/resources/application.yml | 4 ++-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/main/java/zipdabang/server/domain/member/Terms.java b/src/main/java/zipdabang/server/domain/member/Terms.java index e1ef29b..6a8379e 100644 --- a/src/main/java/zipdabang/server/domain/member/Terms.java +++ b/src/main/java/zipdabang/server/domain/member/Terms.java @@ -27,4 +27,4 @@ public class Terms { @OneToMany(mappedBy = "terms", cascade = CascadeType.ALL) private List termsAgreeList; -} +} \ No newline at end of file diff --git a/src/main/java/zipdabang/server/repository/recipeRepositories/RecipeCategoryRepository.java b/src/main/java/zipdabang/server/repository/recipeRepositories/RecipeCategoryRepository.java index 8ad1e35..494a563 100644 --- a/src/main/java/zipdabang/server/repository/recipeRepositories/RecipeCategoryRepository.java +++ b/src/main/java/zipdabang/server/repository/recipeRepositories/RecipeCategoryRepository.java @@ -5,8 +5,11 @@ import zipdabang.server.domain.recipe.RecipeCategory; import java.util.List; +import java.util.Optional; public interface RecipeCategoryRepository extends JpaRepository { List findAllById(Long categoryId); + + Optional findById(Long id); } diff --git a/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java b/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java index 72eda38..7595c67 100644 --- a/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java +++ b/src/main/java/zipdabang/server/web/dto/requestDto/MemberRequestDto.java @@ -102,6 +102,21 @@ public static class MemberInfoDto { private List preferBeverages; + @Override + public String toString() { + return "MemberInfoDto{" + + "name='" + name + '\'' + + ", birth='" + birth + '\'' + + ", email='" + email + '\'' + + ", gender='" + gender + '\'' + + ", nickname='" + nickname + '\'' + + ", phoneNum='" + phoneNum + '\'' + + ", fcmToken='" + fcmToken + '\'' + + ", serialNumber='" + serialNumber + '\'' + + ", agreeTermsIdList=" + agreeTermsIdList + + ", preferBeverages=" + preferBeverages + + '}'; + } } @Getter diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 2ecc3e9..6d1b4db 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -230,8 +230,8 @@ spring: hbm2ddl: auto: update default_batch_fetch_size: 1000 - show_sql: true - format_sql: true +# show_sql: true +# format_sql: true logging: level: From 9536e5eaf72bccbbf04eeac83cfc260b0be73219 Mon Sep 17 00:00:00 2001 From: YONGWOOK CHOI <60510921+CYY1007@users.noreply.github.com> Date: Tue, 31 Oct 2023 21:50:17 +0900 Subject: [PATCH 5/8] =?UTF-8?q?Ci/252=20=EB=B2=84=EA=B7=B8=20=EB=A1=9C?= =?UTF-8?q?=EA=B9=85=20(#265)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * 로깅 추가 * 로깅 추가 --- .../zipdabang/server/apiPayload/exception/ExceptionAdvice.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/zipdabang/server/apiPayload/exception/ExceptionAdvice.java b/src/main/java/zipdabang/server/apiPayload/exception/ExceptionAdvice.java index 7feecf8..24de79d 100644 --- a/src/main/java/zipdabang/server/apiPayload/exception/ExceptionAdvice.java +++ b/src/main/java/zipdabang/server/apiPayload/exception/ExceptionAdvice.java @@ -75,6 +75,8 @@ public ResponseEntity onThrowException(GeneralException generalException, @AuthenticationPrincipal User user, HttpServletRequest request) { getExceptionStackTrace(generalException, user, request); Reason errorReasonHttpStatus = generalException.getErrorReasonHttpStatus(); + System.out.println(generalException.getMessage()); + System.out.println(generalException.getCode()); return handleExceptionInternal(generalException,errorReasonHttpStatus,null,request); } @@ -157,6 +159,7 @@ private void getExceptionStackTrace(Exception e, @AuthenticationPrincipal User u pw.append("uid: " + user.getUsername() + "\n"); } pw.append(e.getMessage()); + System.out.println(e.getMessage()); pw.append("\n====================================================================="); log.error(sw.toString()); } From 8304ae740db4b6642e4368d8e1e2f020e0a767f3 Mon Sep 17 00:00:00 2001 From: YONGWOOK CHOI <60510921+CYY1007@users.noreply.github.com> Date: Tue, 31 Oct 2023 23:12:22 +0900 Subject: [PATCH 6/8] =?UTF-8?q?Ci/252=20=F0=9F=90=9B=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=20=EC=B6=94=EC=A0=81=20=EB=A1=9C=EA=B9=85=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20(#267)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * release 인프라 디비 접속정보 수정 (#262) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * Ci/252 (#261) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * 로깅 추가 * 로깅 추가 (#264) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * Ci/252 (#261) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * Ci/252 로깅 추가 (#263) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * 로깅 추가 * 로깅 추가 * 버그 로깅 (#266) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * Ci/252 (#261) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * Ci/252 로깅 추가 (#263) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * 로깅 추가 * Ci/252 버그 로깅 (#265) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * 🐛 redis 연결정보 수정 (#260) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * relase redis 수정 (#259) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * release db 수정 (#258) * :construction_worker: Ci : 릴리즈 인프라 구축 (#255) * Ci/252 relase db 수정 (#257) * :construction_worker: Ci : 릴리즈 인프라 구축 * relase db create * :construction_worker: Ci : relase application.yml 수정 * release db 설정 수정 * 로깅 추가 * 로깅 추가 * :bug: Fix : 에러 추적 로깅 --- .../server/service/serviceImpl/RootServiceImpl.java | 5 +++++ .../java/zipdabang/server/web/controller/RootController.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java b/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java index a72dccb..cb1a515 100644 --- a/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java +++ b/src/main/java/zipdabang/server/service/serviceImpl/RootServiceImpl.java @@ -73,11 +73,16 @@ public List getAllCategories() { public Boolean autoLoginService(String authorizationHeader) { Boolean result = null; + + log.info("root service에서 bearer 제거한 토큰 : {}", authorizationHeader); + if(authorizationHeader == null) result = false; else{ String token = authorizationHeader.substring(7); Long memberId = tokenProvider.validateAndReturnSubject(token); + + log.info("토큰 파싱 결과 : {}", memberId); if (memberId.equals(0L)) result = true; else if (memberId < 0L){ diff --git a/src/main/java/zipdabang/server/web/controller/RootController.java b/src/main/java/zipdabang/server/web/controller/RootController.java index 8ea852c..3388d5c 100644 --- a/src/main/java/zipdabang/server/web/controller/RootController.java +++ b/src/main/java/zipdabang/server/web/controller/RootController.java @@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -36,6 +37,7 @@ @RestController @Validated @RequiredArgsConstructor +@Slf4j @ApiResponses({ @ApiResponse(responseCode = "2000",description = "OK 성공"), @ApiResponse(responseCode = "4003",description = "UNAUTHORIZED, 토큰 모양이 이상함, 토큰 제대로 주세요",content = @Content(schema = @Schema(implementation = ResponseDto.class))), @@ -80,6 +82,8 @@ public ResponseDto showBanners() { }) @GetMapping("/auto-login") public ResponseDto autoLogin(@RequestHeader(value = "Authorization", required = false) String authorizationHeader){ + + log.info("프론트가 보낸토큰 : {}", authorizationHeader); Boolean autoResult = rootService.autoLoginService(authorizationHeader); if(autoResult) return ResponseDto.of(CommonStatus.AUTO_LOGIN_MAIN,null); From 30b3a63eb6ce776c1ee842119a77509c137366cb Mon Sep 17 00:00:00 2001 From: Hanvp Date: Fri, 3 Nov 2023 13:45:57 +0900 Subject: [PATCH 7/8] =?UTF-8?q?:bug:=20Bug/269=20nullable=3Dfalse=20?= =?UTF-8?q?=EB=B0=8F=20is=5Fofficial=20column=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/zipdabang/server/domain/recipe/Comment.java | 2 +- src/main/java/zipdabang/server/domain/recipe/Recipe.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/zipdabang/server/domain/recipe/Comment.java b/src/main/java/zipdabang/server/domain/recipe/Comment.java index d714a36..8fccef4 100644 --- a/src/main/java/zipdabang/server/domain/recipe/Comment.java +++ b/src/main/java/zipdabang/server/domain/recipe/Comment.java @@ -22,7 +22,7 @@ public class Comment extends BaseEntity { @Column(nullable = false) private Long id; - @Column(columnDefinition = "TEXT") + @Column(columnDefinition = "TEXT", nullable = false) private String content; @ManyToOne(fetch = FetchType.LAZY) diff --git a/src/main/java/zipdabang/server/domain/recipe/Recipe.java b/src/main/java/zipdabang/server/domain/recipe/Recipe.java index 6294ece..e801f1f 100644 --- a/src/main/java/zipdabang/server/domain/recipe/Recipe.java +++ b/src/main/java/zipdabang/server/domain/recipe/Recipe.java @@ -30,7 +30,7 @@ public class Recipe extends BaseEntity { @Column(nullable = false) private Boolean isBarista; - @Column(nullable = false) + @Column(columnDefinition = "boolean default false", nullable = false) private Boolean isOfficial; @Column(nullable = false) From 1e1534fdefc56f414914a8a8fc7dd85ace6d144d Mon Sep 17 00:00:00 2001 From: Hanvp Date: Sat, 4 Nov 2023 18:24:03 +0900 Subject: [PATCH 8/8] =?UTF-8?q?:loud=5Fsound:=20Bug/271=20=EB=A0=88?= =?UTF-8?q?=EC=8B=9C=ED=94=BC,=20=EB=8C=93=EA=B8=80=20=EC=84=9C=EB=B2=84?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=EC=82=AD=EC=A0=9C=20=EC=95=88=EB=90=A0=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=EC=9D=98=20=EB=A1=9C=EA=B7=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zipdabang/server/apiPayload/code/CommonStatus.java | 6 +++++- .../server/web/controller/RecipeRestController.java | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/zipdabang/server/apiPayload/code/CommonStatus.java b/src/main/java/zipdabang/server/apiPayload/code/CommonStatus.java index 79d1f9a..e57b06a 100644 --- a/src/main/java/zipdabang/server/apiPayload/code/CommonStatus.java +++ b/src/main/java/zipdabang/server/apiPayload/code/CommonStatus.java @@ -149,7 +149,11 @@ public enum CommonStatus implements BaseCode { //INTERNAL_SERVER_ERROR INTERNAL_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, 5000, "Internal server Error"), //INTERNAL_SERVER_ERROR - FEIGN_CLIENT_ERROR_500(HttpStatus.INTERNAL_SERVER_ERROR, 5001, "Inter server Error in feign client"); + FEIGN_CLIENT_ERROR_500(HttpStatus.INTERNAL_SERVER_ERROR, 5001, "Inter server Error in feign client"), + + RECIPE_NOT_DELETED(HttpStatus.INTERNAL_SERVER_ERROR, 5100, "레시피가 삭제되지 않았습니다."), + COMMENT_NOT_DELETED(HttpStatus.INTERNAL_SERVER_ERROR, 5101, "댓글이 삭제되지 않았습니다."), + TEMP_RECIPE_NOT_DELETED(HttpStatus.INTERNAL_SERVER_ERROR, 5102, "임시저장 레시피가 삭제되지 않았습니다."); private final HttpStatus httpStatus; private final Integer code; diff --git a/src/main/java/zipdabang/server/web/controller/RecipeRestController.java b/src/main/java/zipdabang/server/web/controller/RecipeRestController.java index b38df48..333b80c 100644 --- a/src/main/java/zipdabang/server/web/controller/RecipeRestController.java +++ b/src/main/java/zipdabang/server/web/controller/RecipeRestController.java @@ -160,6 +160,7 @@ public ResponseDto getTempRecipe(@PathVaria @ApiResponse(responseCode = "4052", description = "BAD_REQUEST, 사용자가 없습니다. 이 api에서 이거 생기면 백앤드 개발자 호출", content = @Content(schema = @Schema(implementation = ResponseDto.class))), @ApiResponse(responseCode = "4111", description = "BAD_REQUEST, 해당 임시저장 Id가 존재하지 않습니다.", content = @Content(schema = @Schema(implementation = ResponseDto.class))), @ApiResponse(responseCode = "5000", description = "SERVER ERROR, 백앤드 개발자에게 알려주세요", content = @Content(schema = @Schema(implementation = ResponseDto.class))), + @ApiResponse(responseCode = "5102", description = "SERVER ERROR, 임시저장 레시피가 삭제되지 않았습니다.", content = @Content(schema = @Schema(implementation = ResponseDto.class))), }) @Parameters({ @Parameter(name = "member", hidden = true), @@ -173,7 +174,7 @@ public ResponseDto deleteTempRecipe( if (recipeDeleteBoolean) return ResponseDto.of(tempId + " 임시저장 레시피 삭제 완료"); else - throw new RecipeException(CommonStatus.INTERNAL_ERROR); + throw new RecipeException(CommonStatus.TEMP_RECIPE_NOT_DELETED); } @Operation(summary = "레시피 임시저장 ➡ 최종 저장 API 🔑 ✔", description = "\"레시피 임시저장 ➡ 최종 저장 API입니다. ") @@ -269,6 +270,7 @@ public ResponseDto recipeDetail(@PathVariable(n @ApiResponse(responseCode = "4101", description = "BAD_REQUEST, 해당 recipeId를 가진 recipe가 없어요", content = @Content(schema = @Schema(implementation = ResponseDto.class))), @ApiResponse(responseCode = "4106", description = "BAD_REQUEST, 본인이 작성한 레시피가 아닙니다. 삭제할 수 없습니다", content = @Content(schema = @Schema(implementation = ResponseDto.class))), @ApiResponse(responseCode = "5000", description = "SERVER ERROR, 백앤드 개발자에게 알려주세요", content = @Content(schema = @Schema(implementation = ResponseDto.class))), + @ApiResponse(responseCode = "5100", description = "SERVER ERROR, 레시피가 삭제되지 않았습니다.", content = @Content(schema = @Schema(implementation = ResponseDto.class))), }) @Parameters({ @Parameter(name = "member", hidden = true), @@ -280,7 +282,7 @@ public ResponseDto deleteRecipe(@PathVariable(name = "recipeId") Long re if (recipeDeleteBoolean) return ResponseDto.of(recipeId + " 레시피 삭제 완료"); else - throw new RecipeException(CommonStatus.INTERNAL_ERROR); + throw new RecipeException(CommonStatus.RECIPE_NOT_DELETED); } @Operation(summary = "🍹figma 레시피2, 레시피 검색 카테고리 별 preview 화면 API 🔑 ✔", description = "검색한 레시피 카테고리별 조회 화면 API입니다.") @@ -837,6 +839,8 @@ else if (pageIndex < 1) @ApiResponse(responseCode = "4108", description = "BAD_REQUEST, 본인이 작성한 댓글이 아닙니다. 삭제할 수 없습니다", content = @Content(schema = @Schema(implementation = ResponseDto.class))), @ApiResponse(responseCode = "4112", description = "BAD_REQUEST, 해당 댓글은 넘겨준 레시피 Id에 존재하지 않습니다. 레시피 Id를 올바르게 보내주세요", content = @Content(schema = @Schema(implementation = ResponseDto.class))), @ApiResponse(responseCode = "5000", description = "SERVER ERROR, 백앤드 개발자에게 알려주세요", content = @Content(schema = @Schema(implementation = ResponseDto.class))), + @ApiResponse(responseCode = "5101", description = "SERVER ERROR, 댓글이 삭제되지 않았습니다.", content = @Content(schema = @Schema(implementation = ResponseDto.class))), + }) @Parameters({ @Parameter(name = "member", hidden = true), @@ -848,7 +852,7 @@ public ResponseDto deleteComment(@PathVariable(name = "recipeId") Long r if (commentDeleteBoolean) return ResponseDto.of(commentId + " 댓글 삭제 완료"); else - throw new RecipeException(CommonStatus.INTERNAL_ERROR); + throw new RecipeException(CommonStatus.COMMENT_NOT_DELETED); } @Operation(summary = "댓글 수정 API 🔑 ✔", description = "댓글 수정 API입니다.")