diff --git a/.gitmodules b/.gitmodules index 04b28663..f94ca63c 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 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 9a7cc297..655f237b 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 dae1543f..e32c75f1 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 5da8cd2c..2658b9a3 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()); } diff --git a/server/api/src/main/resources/application-local.yml b/server/api/src/main/resources/application-local.yml index 6ddb864e..c1e98c4f 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 00000000..2d05c206 --- /dev/null +++ b/server/api/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + +