diff --git a/src/main/java/HookKiller/server/auth/helper/KakaoOauthHelper.java b/src/main/java/HookKiller/server/auth/helper/KakaoOauthHelper.java index 4492fb8..3975142 100644 --- a/src/main/java/HookKiller/server/auth/helper/KakaoOauthHelper.java +++ b/src/main/java/HookKiller/server/auth/helper/KakaoOauthHelper.java @@ -28,7 +28,6 @@ public class KakaoOauthHelper { private final OIDCHelper oidcHelper; public KakaoTokenResponse getOauthToken(String code, String referer) { - log.info("referer 1 : {}", referer); return kakaoOauthClient.kakaoAuth( kakaoOauthProperties.getKakaoClientId(), referer , diff --git a/src/main/java/HookKiller/server/auth/helper/OIDCHelper.java b/src/main/java/HookKiller/server/auth/helper/OIDCHelper.java index cf10b7a..9eeac5a 100644 --- a/src/main/java/HookKiller/server/auth/helper/OIDCHelper.java +++ b/src/main/java/HookKiller/server/auth/helper/OIDCHelper.java @@ -16,18 +16,13 @@ public class OIDCHelper { private final JwtOIDCProvider jwtOIDCProvider; private String getKidFromUnsignedIdToken(String token, String iss, String aud) { - log.info("getKidFromUnsignedIdToken 들어옴! token : {}", token); - log.info("getKidFromUnsignedTokenHeader의 반환값 : {}", jwtOIDCProvider.getKidFromUnsignedTokenHeader(token, iss, aud)); return jwtOIDCProvider.getKidFromUnsignedTokenHeader(token, iss, aud); } public OIDCDto getPayloadFromIdToken( String token, String iss, String aud, OIDCResponse oidcResponse) { - log.info("getPayloadFromIdToken 들어옴! token : {}, iss : {}, aud : {}", token, iss, aud); String kid = getKidFromUnsignedIdToken(token, iss, aud); - log.info("kid = {}", kid); - OIDCPublicKeyDto oidcPublicKeyDto = oidcResponse.getKeys().stream() .filter(o -> o.getKid().equals(kid)) diff --git a/src/main/java/HookKiller/server/board/service/ArticleLikeService.java b/src/main/java/HookKiller/server/board/service/ArticleLikeService.java index 7b11995..2ae2edf 100644 --- a/src/main/java/HookKiller/server/board/service/ArticleLikeService.java +++ b/src/main/java/HookKiller/server/board/service/ArticleLikeService.java @@ -40,7 +40,6 @@ public CommonBooleanResultResponse isUserArticleLike(Long articleId) { boolean result = articleLikeRepository.findByArticleAndUser(article, user).isPresent(); log.info("IsUserArticleLike 조회 유저 >>> {} , 조회 요청 ArticleId >>> {}", user.getEmail(), article.getId()); - return CommonBooleanResultResponse.builder() .result(result) .message(result ? ArticleLikeConstants.EXISTS_ARTICLE_LIKE : ArticleLikeConstants.NOT_EXISTS_ARTICLE_LIKE) diff --git a/src/main/java/HookKiller/server/board/service/ReplyService.java b/src/main/java/HookKiller/server/board/service/ReplyService.java index 7e8f163..9f10d93 100644 --- a/src/main/java/HookKiller/server/board/service/ReplyService.java +++ b/src/main/java/HookKiller/server/board/service/ReplyService.java @@ -42,7 +42,6 @@ public class ReplyService { public void createReply(PostReplyRequestDto requestDto) { User user = userUtils.getUser(); - log.error("requestDTO : {}", requestDto.toString()); Reply reply = replyRepository.save( Reply.builder() .replyStatus(USABLE) diff --git a/src/main/java/HookKiller/server/common/AbstractTimeStamp.java b/src/main/java/HookKiller/server/common/AbstractTimeStamp.java index 79e677d..4bd54a1 100644 --- a/src/main/java/HookKiller/server/common/AbstractTimeStamp.java +++ b/src/main/java/HookKiller/server/common/AbstractTimeStamp.java @@ -24,7 +24,9 @@ public abstract class AbstractTimeStamp { @CreatedDate @JsonFormat( shape = JsonFormat.Shape.STRING, - pattern = "yyyy-MM-dd hh:mm:ss") + pattern = "yyyy-MM-dd hh:mm:ss", + timezone = "Asia/Seoul" + ) private Timestamp createAt; @Column( @@ -34,6 +36,8 @@ public abstract class AbstractTimeStamp { @LastModifiedDate @JsonFormat( shape = JsonFormat.Shape.STRING, - pattern = "yyyy-MM-dd hh:mm:ss") + pattern = "yyyy-MM-dd hh:mm:ss", + timezone = "Asia/Seoul" + ) private Timestamp updateAt; } diff --git a/src/main/java/HookKiller/server/common/util/UserUtils.java b/src/main/java/HookKiller/server/common/util/UserUtils.java index f9440c5..d14267b 100644 --- a/src/main/java/HookKiller/server/common/util/UserUtils.java +++ b/src/main/java/HookKiller/server/common/util/UserUtils.java @@ -29,7 +29,6 @@ public static Long getCurrentUserId() { if (authentication == null) { throw SecurityContextNotFoundException.EXCEPTION; } - log.info("principal : {}", authentication.getPrincipal().toString()); return Long.valueOf(authentication.getName()); } public User getUser() { diff --git a/src/main/java/HookKiller/server/jwt/JwtAuthenticationEntryPoint.java b/src/main/java/HookKiller/server/jwt/JwtAuthenticationEntryPoint.java index a45d375..6a5e361 100644 --- a/src/main/java/HookKiller/server/jwt/JwtAuthenticationEntryPoint.java +++ b/src/main/java/HookKiller/server/jwt/JwtAuthenticationEntryPoint.java @@ -17,8 +17,6 @@ public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException { - log.error("JwtAuthenticationEntryPoint 탐"); - response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); } } diff --git a/src/main/java/HookKiller/server/jwt/JwtAuthenticationFilter.java b/src/main/java/HookKiller/server/jwt/JwtAuthenticationFilter.java index a928198..2c3d5b0 100644 --- a/src/main/java/HookKiller/server/jwt/JwtAuthenticationFilter.java +++ b/src/main/java/HookKiller/server/jwt/JwtAuthenticationFilter.java @@ -39,19 +39,17 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { - log.info("request: {}gdgd", request.getHeader(HEADER_STRING)); - // 토근을 가져옴 String header = request.getHeader(HEADER_STRING); String authToken = null; - log.error("JWT HEADER : {}", header) ; + log.info("JWT HEADER : {}", header) ; // Bearer token인 경우 JWT 토큰 유효성 검사 진행 // AuthenticationManager 역할을 함. -> 토큰이 인증되어있으면 필터로 보내서 context에 저장. 토큰이 인증되어있지 않다면 AuthenticationProvider로 보내어 인증하도록 함. // token 검증이 되고 인증 정보가 존재하지 않는 경우 spring security 인증 정보 저장 if (header != null && header.startsWith(TOKEN_PREFIX) && !header.equalsIgnoreCase(TOKEN_PREFIX)) { authToken = header.replace(TOKEN_PREFIX,""); - log.warn("AuthToken : {}", authToken); + log.info("AuthToken : {}", authToken); try { AccessTokenDetail accessTokenDetail = jwtTokenProvider.parseAccessToken(authToken); @@ -79,7 +77,6 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse // Filter에서 제외할 URL 설정 @Override protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException { - jwtProperties.getExcludePath().forEach(path -> log.info("path: {}\n", path)); return jwtProperties.getExcludePath().stream().anyMatch(exclude -> exclude.equalsIgnoreCase(request.getServletPath())); } } diff --git a/src/main/java/HookKiller/server/jwt/JwtOIDCProvider.java b/src/main/java/HookKiller/server/jwt/JwtOIDCProvider.java index 3367eeb..9ba1c56 100644 --- a/src/main/java/HookKiller/server/jwt/JwtOIDCProvider.java +++ b/src/main/java/HookKiller/server/jwt/JwtOIDCProvider.java @@ -30,7 +30,6 @@ public class JwtOIDCProvider { // 외부에서 돌릴 검증 로직 public String getKidFromUnsignedTokenHeader(String token, String iss, String aud) { - log.error("getKidFromUnsignedTokenHeader들어옴!"); return (String) getUnsignedTokenClaims(token, iss, aud).getHeader().get(KID); } diff --git a/src/main/resources/application-db.yml b/src/main/resources/application-db.yml index cd30552..fd09d8f 100644 --- a/src/main/resources/application-db.yml +++ b/src/main/resources/application-db.yml @@ -2,6 +2,6 @@ spring: # 매번 data.sql 기반으로 업데이트 되기 떄문에 데이터 많이 추가해주세요~ datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://${hook.db.url}:${hook.db.port}/${hook.db.database} + url: jdbc:mysql://${hook.db.url}:${hook.db.port}/${hook.db.database}?serverTimezone=UTC&useLegacyDatetimeCode=false username: ${hook.db.username} password: ${hook.db.password}