From a881c74c400aa632b74faccd7b847565aaf1ca02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=B0=AC=EC=A4=80?= <100582352+Lunawood@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:55:58 +0900 Subject: [PATCH] fix: Update JwtTokenService.java call env --- .../main/java/com/example/server/jwt/JwtTokenService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker-test-server/src/main/java/com/example/server/jwt/JwtTokenService.java b/docker-test-server/src/main/java/com/example/server/jwt/JwtTokenService.java index e49cc2f..c1eaa6c 100644 --- a/docker-test-server/src/main/java/com/example/server/jwt/JwtTokenService.java +++ b/docker-test-server/src/main/java/com/example/server/jwt/JwtTokenService.java @@ -9,7 +9,6 @@ import com.auth0.jwt.algorithms.Algorithm; import com.auth0.jwt.interfaces.DecodedJWT; -import io.github.cdimascio.dotenv.Dotenv; import lombok.extern.slf4j.Slf4j; @Slf4j @@ -17,7 +16,7 @@ public class JwtTokenService { Dotenv dotenv = Dotenv.configure().load(); - private String secret = dotenv.get("JWT_SECRET_KEY"); + private String secret = System.getenv("JWT_SECRET_KEY"); private int accessTokenExpMinutes = 1728000 * 1000; // 10분 @@ -129,4 +128,4 @@ public Long extractIdFromAccessToken(String token) throws Exception { String idString = jwt.getSubject(); return Long.parseLong(idString); } -} \ No newline at end of file +}