diff --git a/src/main/java/org/sopt/seonyakServer/global/common/external/googlemeet/GoogleMeetConfig.java b/src/main/java/org/sopt/seonyakServer/global/common/external/googlemeet/GoogleMeetConfig.java index 5fb43bf..8b30cb7 100644 --- a/src/main/java/org/sopt/seonyakServer/global/common/external/googlemeet/GoogleMeetConfig.java +++ b/src/main/java/org/sopt/seonyakServer/global/common/external/googlemeet/GoogleMeetConfig.java @@ -21,14 +21,12 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; @Configuration @Slf4j public class GoogleMeetConfig { - @Value("${google.credentials.file.path}") - private String credentialsFilePath; - @Value("${google.credentials.oauth2.callback.uri}") private String callbackUri; @@ -73,12 +71,8 @@ public void delete(String id) throws IOException { @Bean public UserAuthorizer userAuthorizer(TokenStore tokenStore) throws IOException { - log.info("credentials path: " + credentialsFilePath); - Path credentialsPath = Paths.get(credentialsFilePath); - if (!Files.exists(credentialsPath)) { - throw new CustomException(ErrorType.NOT_FOUND_CREDENTIALS_JSON_ERROR); - } - try (InputStream in = Files.newInputStream(credentialsPath)) { + ClassPathResource resource = new ClassPathResource("json/credentials.json"); + try (InputStream in = resource.getInputStream()) { ClientId clientId = ClientId.fromStream(in); return UserAuthorizer.newBuilder() .setClientId(clientId)