From aa15d6a164f4b8ae9d8055ecce9d1bc28a756d09 Mon Sep 17 00:00:00 2001 From: sung-silver Date: Fri, 15 Mar 2024 02:42:47 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20JWT=20=EC=84=9C=EB=B9=84=EC=8A=A4?= =?UTF-8?q?=EC=97=90=EC=84=9C=20memberRepository=20=EC=82=AC=EC=9A=A9=20Up?= =?UTF-8?q?date=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=EC=97=90=20Transactional=20?= =?UTF-8?q?=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4=EC=85=98=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 --- .../java/com/org/gunbbang/auth/jwt/service/JwtService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/src/main/java/com/org/gunbbang/auth/jwt/service/JwtService.java b/api/src/main/java/com/org/gunbbang/auth/jwt/service/JwtService.java index d7bc2ef..35d09e1 100644 --- a/api/src/main/java/com/org/gunbbang/auth/jwt/service/JwtService.java +++ b/api/src/main/java/com/org/gunbbang/auth/jwt/service/JwtService.java @@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; @Service @RequiredArgsConstructor @@ -98,6 +99,7 @@ public void reIssueTokensAndUpdateRefreshToken(HttpServletResponse response, Mem } /** GUEST였던 회원이 닉네임 변경하고 USER로 되었을 때 사용 */ + @Transactional public void reIssueTokensAndUpdateRefreshToken(HttpServletResponse response, Long memberId) { Member foundMember = memberRepository @@ -235,6 +237,7 @@ public boolean isTokenExpired(String token) { } } + @Transactional public void updateRefreshTokenByMemberId(Long memberId, String refreshToken) { memberRepository .findById(memberId)