diff --git a/src/main/java/com/onnoff/onnoff/auth/service/AppleLoginService.java b/src/main/java/com/onnoff/onnoff/auth/service/AppleLoginService.java index f15ad85..a1b6a20 100644 --- a/src/main/java/com/onnoff/onnoff/auth/service/AppleLoginService.java +++ b/src/main/java/com/onnoff/onnoff/auth/service/AppleLoginService.java @@ -96,8 +96,7 @@ public String getAccessTokenByRfToken(String code) { return null; } private PrivateKey getPrivateKey() throws IOException { - ClassPathResource resource = new ClassPathResource(keyPath); - String privateKey = new String(Files.readAllBytes(Paths.get(resource.getURI()))); + String privateKey = new String(Files.readAllBytes(Paths.get(keyPath) ) ); Reader pemReader = new StringReader(privateKey); PEMParser pemParser = new PEMParser(pemReader); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b9eec07..96e3d44 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -19,7 +19,7 @@ apple: team-id: ${APPLE_TEAM_ID} # = ID prefix key: id: ${APPLE_KEY_ID} - path: classpath:/AuthKey_${APPLE_KEY_ID}.p8 # 나중에 src/main/resources/apple/에 키 파일 저장, 그냥 문자열로 가져와도 될 것 같기도 + path: /var/app/current/src/main/resources/AuthKey_${APPLE_KEY_ID}.p8 # 나중에 src/main/resources/apple/에 키 파일 저장 kakao: redirect-uri: ${KAKAO_REDIRECT_URI} iss: https://kauth.kakao.com