[Mod] google login clientid 설정 수정 및 docker container 한국시간대 설정 #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
수정한 코드
관련 내용
웹앱과 ios앱의 구글 client id가 다르기 때문에 idToken 인증을 할때 두개의 client id 경우를 모두 고려해야해서 list로 처리
이렇게 진행하는 경우,
@value는 Spring이 객체를 생성한 후에 값을 주입하지만
static final List은 클래스 로드(컴파일 시점)에서 초기화됨
=> webClientId와 appClientId가 아직 null일 때 List.of(webClientId, appClientId)를 실행
-> NullPointerException이 발생 가능
Spring이 GoogleLoginService 객체를 생성할 때, 생성자를 호출함
-> Spring은 @value가 붙은 webClientId, appClientId를 먼저 읽어옴
-> 생성자 실행 시, List.of(webClientId, appClientId)가 null이 아닌 실제 값으로 초기화됨
-> 정상적으로 validClientIds가 초기화됨