From f713ce655ac252ee673e531671600a095891020f Mon Sep 17 00:00:00 2001 From: seungyeop-lee Date: Tue, 23 Jul 2024 15:58:42 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=EB=AF=B8=EC=82=AC=EC=9A=A9=20subm?= =?UTF-8?q?odule=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 04b2866..f94ca63 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ [submodule "devenv/sql"] path = devenv/sql url = git@github.com:makevook/vook-sql.git -[submodule "api/src/test/resources/migrate/sql"] - path = api/src/test/resources/migrate/sql - url = git@github.com:makevook/vook-sql.git [submodule "server/api/src/test/resources/migrate/sql"] path = server/api/src/test/resources/migrate/sql url = git@github.com:makevook/vook-sql.git From 3bf7213f21fbc4290a6fe51f0331b5d331f0eaf1 Mon Sep 17 00:00:00 2001 From: seungyeop-lee Date: Wed, 24 Jul 2024 00:36:15 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=EC=83=81=EC=84=B8=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80=20#176?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/src/main/resources/application-local.yml | 3 +-- server/api/src/main/resources/logback.xml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 server/api/src/main/resources/logback.xml diff --git a/server/api/src/main/resources/application-local.yml b/server/api/src/main/resources/application-local.yml index 6ddb864..c1e98c4 100644 --- a/server/api/src/main/resources/application-local.yml +++ b/server/api/src/main/resources/application-local.yml @@ -40,5 +40,4 @@ service: accessTokenExpiredMinute: 30 # 30 minutes refreshTokenExpiredMinute: 10080 # 60 * 24 * 7 == 1 week logging: - level: - vook.server.api: DEBUG + config: classpath:logback.xml diff --git a/server/api/src/main/resources/logback.xml b/server/api/src/main/resources/logback.xml new file mode 100644 index 0000000..2d05c20 --- /dev/null +++ b/server/api/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + From 30c13b6bac551dfa39a90a4c6486a698f2eaf875 Mon Sep 17 00:00:00 2001 From: seungyeop-lee Date: Wed, 24 Jul 2024 00:39:37 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=EB=A1=9C=EA=B7=B8=20=EB=A0=88?= =?UTF-8?q?=EB=B2=A8=20=EC=9E=AC=EC=84=A4=EC=A0=95=20#176?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/vook/server/api/web/common/auth/jwt/JWTFilter.java | 2 +- .../api/web/common/auth/oauth2/VookOAuth2UserService.java | 4 ++-- .../api/web/common/response/GlobalRestControllerAdvice.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/api/src/main/java/vook/server/api/web/common/auth/jwt/JWTFilter.java b/server/api/src/main/java/vook/server/api/web/common/auth/jwt/JWTFilter.java index 9a7cc29..655f237 100644 --- a/server/api/src/main/java/vook/server/api/web/common/auth/jwt/JWTFilter.java +++ b/server/api/src/main/java/vook/server/api/web/common/auth/jwt/JWTFilter.java @@ -35,7 +35,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse try { oAuth2User = VookLoginUser.of(tokenService.validateAndGetUid(token)); } catch (Exception e) { - log.error("JWT validation failed", e); + log.debug("JWT validation failed", e); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); return; } diff --git a/server/api/src/main/java/vook/server/api/web/common/auth/oauth2/VookOAuth2UserService.java b/server/api/src/main/java/vook/server/api/web/common/auth/oauth2/VookOAuth2UserService.java index dae1543..e32c75f 100644 --- a/server/api/src/main/java/vook/server/api/web/common/auth/oauth2/VookOAuth2UserService.java +++ b/server/api/src/main/java/vook/server/api/web/common/auth/oauth2/VookOAuth2UserService.java @@ -24,12 +24,12 @@ public class VookOAuth2UserService extends DefaultOAuth2UserService { @Override public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException { OAuth2User oAuth2User = super.loadUser(userRequest); - log.info("OAuth2User: {}", oAuth2User); + log.debug("OAuth2User: {}", oAuth2User); String registrationId = userRequest.getClientRegistration().getRegistrationId(); OAuth2Response oAuth2Response = toOAuth2Response(registrationId, oAuth2User); if (oAuth2Response == null) { - log.info("Unsupported registrationId: {}", registrationId); + log.warn("Unsupported registrationId: {}", registrationId); return null; } diff --git a/server/api/src/main/java/vook/server/api/web/common/response/GlobalRestControllerAdvice.java b/server/api/src/main/java/vook/server/api/web/common/response/GlobalRestControllerAdvice.java index 5da8cd2..2658b9a 100644 --- a/server/api/src/main/java/vook/server/api/web/common/response/GlobalRestControllerAdvice.java +++ b/server/api/src/main/java/vook/server/api/web/common/response/GlobalRestControllerAdvice.java @@ -14,7 +14,7 @@ public class GlobalRestControllerAdvice { @ExceptionHandler(AppException.class) public ResponseEntity handleAppException(AppException e) { - log.error(e.getMessage(), e); + log.debug(e.getMessage(), e); String contents = e.getClass().getSimpleName().replace("Exception", ""); CommonApiException badRequest = CommonApiException.badRequest(ApiResponseCode.BadRequest.VIOLATION_BUSINESS_RULE, e, contents); return ResponseEntity.status(badRequest.statusCode()).body(badRequest.response()); @@ -22,7 +22,7 @@ public ResponseEntity handleAppException(AppException e) { @ExceptionHandler(CommonApiException.class) public ResponseEntity handleCommonApiException(CommonApiException e) { - log.error(e.getMessage(), e); + log.debug(e.getMessage(), e); return ResponseEntity.status(e.statusCode()).body(e.response()); }