//의존 라이브러리 추가
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
//Spring Boot가 OAuth 2를 자동구성 할 수 있게 함
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
출력할 templates(html)를 구현한다
컨트롤러 구현 - 뷰 이름을 리턴시켜 html을 제공한다

OAuth 2 로그인 인증을 활성화 시키고 모든 접곤을 인증한 경우만을 허용한다

OAuth 2에 대한 설정을 추가한다
미리 만들어 둔 '구글 oauth 클라이언트'의 아이디와 비밀키를 설정한다
구글 API 및 서비스 콘솔에서 생성, 실 사용에선 키는 설정파일에 직접 등록하지 말것




@AuthenticationPrincipal -> OAuth2User
OAuth2AuthorizedClientService를 DI 받는 방법

OAuth2AuthorizedClient를 핸들러 메서드의 파라미터로 전달받는 방법

@RegisteredOAuth2AuthorizedClient -> OAuth2AuthorizedClient
저도 개발자인데 같이 교류 많이 해봐요 ㅎㅎ! 서로 화이팅합시다!