기준 링크
Spring Boot와 AWS로 혼자 구현하는 웹서비스 5장
그 외 참고 링크
SpringBoot에서 JPA 사용하기(4) - JPA Auditing
스프링 부트로 OAuth2 구현(페이스북, 구글, 카카오, 네이버)
진행 상황 정리
프로젝트 생성
- User.java
package com.example.OAuth2Login.domain.user;
import com.example.OAuth2Login.domain.BaseTimeEntity;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import jakarta.persistence.*;
@Getter
@NoArgsConstructor
@Entity
public class User extends BaseTimeEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String email;
@Column
private String picture;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private Role role;
@Builder
public User(String name, String email, String picture, Role role) {
this.name = name;
this.email = email;
this.picture = picture;
this.role = role;
}
public User update(String name, String picture) {
this.name = name;
this.picture = picture;
return this;
}
public String getRoleKey() {
return this.role.getKey();
}
}
(에러 나는 부분은 우선적으로 Alt + Enter를 통해 자동 해결 -> 안되면 찾아보기)
import com.example.OAuth2Login.domain.BaseTimeEntity;
public class User extends BaseTimeEntity {
2가지에서 문제 발생
-> 해결방법
1) build.gradle에서 라이브러리 추가
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.2'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
이 부분 추가할 것
2) BaseTimeEntity.java 추가
이 부분은 아주 기초적인 자바였는데, import를 했으나 타겟하고 있는 java 파일이 없으니 당연히 오류가 나는 것이었다.
- BaseTimeEntity.java 코드
package com.example.OAuth2Login.domain;
import lombok.Getter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
import java.time.LocalDateTime;
@Getter
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class BaseTimeEntity {
@CreatedDate
private LocalDateTime createdDate;
@LastModifiedDate
private LocalDateTime modifiedDate;
}
- Role.java -> 위의 User.java와 위치 동일
package com.example.OAuth2Login.domain.user;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public enum Role {
GUEST("ROLE_GUEST","손님"),
USER("ROLE_USER","일반 사용자");
private final String key;
private final String title;
}
- UserRepository.java
OAuth2Login\src\main\java\com\example\OAuth2Login\domain\user\UserRepository.java
package com.example.OAuth2Login.domain.user;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public enum Role {
GUEST("ROLE_GUEST","손님"),
USER("ROLE_USER","일반 사용자");
private final String key;
private final String title;
}
스프링 시큐리티 설정
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.2'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
주의 : 아직 CustomOAuth2UserService 클래스를 만들지 않아 컴파일 에러가 발생해도 됨.
OAuth2Login\src\main\java\com\example\OAuth2Login\config\auth\SecurityConfig.java
SecurityConfig.java 코드 -> 에러 발생
1) "WebSecurityConfigurerAdapter Deprecated" + ".authorizeRequests() is deprecated" 해결
이전(Springboot 2.X에서 사용하는 방식에 따른 에러 발생)
.authorizeRequests()
.antMatchers("/","/css/**","/images/**","/js/**","/h2-console/**").permitAll()
.antMatchers("/api/v1/**").hasRole(Role.USER.name())
.anyRequest().authenticated()
이후(Springboot 3.X에서 사용해야 하는 방식)
- 참고 링크 : Updating to Spring Security 6.0 - replacing Removed and Deprecated functionality for securing requests
-> 여기에서 잘 보면 해결 가능하다(사실 이전 프로젝트 할때도 이 문제가 있었다.... 해결 못한거였네 ㅎㅎㅎ)
-> ".authorizeRequests()" 대신 ".authorizeHttpRequests()"
-> ".antMatchers(..." 대신 ".requestMatchers(..."
반영된 SecurityConfig.java 코드
package com.example.OAuth2Login.config.auth;
import com.example.OAuth2Login.domain.user.Role;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
@RequiredArgsConstructor
@EnableWebSecurity //1
public class SecurityConfig {
private final CustomOAuth2UserService customOAuth2UserService;
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.csrf().disable()
.headers().frameOptions().disable() //2
.and()
.authorizeHttpRequests() //3
.requestMatchers("/","/css/**","/images/**","/js/**","/h2-console/**").permitAll()
.requestMatchers("/api/v1/**").hasRole(Role.USER.name()) //4
.anyRequest().authenticated()//5
.and()
.logout()
.logoutSuccessUrl("/")//6
.and()
.oauth2Login()//7
.userInfoEndpoint()//8
.userService(customOAuth2UserService);//9
return http.build();
}
}
CustomOAuth2UserService.java 생성
위치 : 바로 위의 SecurityConfig.java와 동일한 위치
CustomOAuth2UserService.java 코드 -> 현재 단계에는 아직 생성되지 않은 클래스들이 있어 에러 발생하는 것으로 보임.
package com.example.OAuth2Login.config.auth;
import com.example.OAuth2Login.domain.user.User;
import com.example.OAuth2Login.domain.user.UserRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService;
import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest;
import org.springframework.security.oauth2.client.userinfo.OAuth2UserService;
import org.springframework.security.oauth2.core.OAuth2AuthenticationException;
import org.springframework.security.oauth2.core.user.DefaultOAuth2User;
import org.springframework.security.oauth2.core.user.OAuth2User;
import org.springframework.stereotype.Service;
import jakarta.servlet.http.HttpSession;
import java.util.Collections;
@RequiredArgsConstructor
@Service
public class CustomOAuth2UserService implements OAuth2UserService<OAuth2UserRequest, OAuth2User> {
private final UserRepository userRepository;
private final HttpSession httpSession;
@Override
public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException {
OAuth2UserService<OAuth2UserRequest, OAuth2User> delegate = new DefaultOAuth2UserService();
OAuth2User oAuth2User = delegate.loadUser(userRequest);
String registrationId = userRequest
.getClientRegistration().getRegistrationId(); //1
String userNameAttributeName = userRequest
.getClientRegistration().getProviderDetails()
.getUserInfoEndpoint()
.getUserNameAttributeName(); //2
OAuthAttributes attributes = OAuthAttributes.of(registrationId, userNameAttributeName,
oAuth2User.getAttributes()); //3
User user = saveOrUpdate(attributes);
httpSession.setAttribute("user", new SessionUser(user)); //4
return new DefaultOAuth2User(
Collections.singleton(new
SimpleGrantedAuthority((user.getRoleKey()))),
attributes.getAttributes(),
attributes.getNameAttributeKey()
);
}
private User saveOrUpdate (OAuthAttributes attributes) {
User user = userRepository.findByEmail(attributes.getEmail())
.map(entity -> entity.update(attributes.getName(), attributes.getPicture()))
.orElse(attributes.toEntity());
return userRepository.save(user);
}
}
에러
우선 계속 진행하기
OAuthAttributes클래스 생성
-> OAuthAttributes는 Dto로 봐야 한다 -> config.auth.dto 패키지에 생성
위치
- OAuthAttributes.java 코드
package com.example.OAuth2Login.config.auth.dto;
import com.example.OAuth2Login.domain.user.Role;
import com.example.OAuth2Login.domain.user.User;
import lombok.Builder;
import lombok.Getter;
import java.util.Map;
@Getter
public class OAuthAttributes {
private Map<String, Object> attributes;
private String nameAttributeKey;
private String name;
private String email;
private String picture;
@Builder
public OAuthAttributes(Map<String, Object> attributes, String nameAttributeKey, String name, String email, String picture) {
this.attributes = attributes;
this.nameAttributeKey = nameAttributeKey;
this.name = name;
this.email = email;
this.picture = picture;
}
public static OAuthAttributes of(String registrationId,
String userNameAttributeName,
Map<String, Object> attributes) {
return ofGoogle(userNameAttributeName, attributes);
}
//1
private static OAuthAttributes ofGoogle(String
userNameAttributeName,
Map<String, Object> attributes) {
return OAuthAttributes.builder()
.name((String)attributes.get("name"))
.email((String)attributes.get("email"))
.picture((String) attributes.get("picture"))
.attributes(attributes)
.nameAttributeKey(userNameAttributeName)
.build();
}
//2
public User toEntity(){
return User.builder()
.name(name)
.email(email)
.picture(picture)
.role(Role.GUEST)
.build();
}
}
- SessionUser.java 코드
package com.example.OAuth2Login.config.auth.dto;
import com.example.OAuth2Login.domain.user.User;
import lombok.Getter;
import java.io.Serializable;
@Getter
public class SessionUser implements Serializable {
private String name;
private String email;
private String picture;
public SessionUser(User user) {
this.name = user.getName();
this.email = user.getEmail();
this.picture = user.getPicture();
}
}
로그인 기능 테스트
- index.mustache 코드 -> 원래 보여준 코드로는 태그가 다 닫히지 않아서 구글링해서 밑부분을 추가해서 넣었다.
{{>layout/header}}
<h1>스프링부트로 시작하는 웹 서비스 Ver.2</h1>
<div class="col-md-12">
<div class="row">
<div class="col-md-6">
<a href="/posts/save" role="button" class="btn btn-primary">글 등록</a>
{{#userName}}
Logged in as: <span id="user">{{userName}}</span>
<a href="/logout" class="btn btn-info active" role="button">Logout</a>
{{/userName}}
{{^userName}}
<a href="/oauth2/authorization/google" class="btn btn-success active" role="button">Google Login</a>
<a href="/oauth2/authorization/naver" class="btn btn-secondary active" role="button">Naver Login</a>
{{/userName}}
</div>
</div>
<br>
<!-- 목록 출력 영역 -->
<table class="table table-horizontal table-bordered">
<thead class="thead-strong">
<tr>
<th>게시글번호</th>
<th>제목</th>
<th>작성자</th>
<th>최종수정일</th>
</tr>
</thead>
<tbody id="tbody">
{{#posts}}
<tr>
<td>{{id}}</td>
<td><a href="/posts/update/{{id}}">{{title}}</a></td>
<td>{{author}}</td>
<td>{{modifiedDate}}</td>
</tr>
{{/posts}}
</tbody>
</table>
</div>
{{>layout/footer}}
index.mustache에서 userName을 사용할 수 있도록 userName을 Model에 추가하는 코드 생성
IndexController.java
위치 : 기본 패키지 아래에 web 패키지 생성하고, indexController.java 생성해야한다.
- IndexController.java 코드
package com.example.OAuth2Login.web;
import com.example.OAuth2Login.config.auth.dto.SessionUser;
import com.example.OAuth2Login.service.posts.PostsService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@RequiredArgsConstructor
@Controller
public class IndexController {
private final PostService postService;
@GetMapping("/")
public String index(Model model){
model.addAttribute("posts", postsService.findAllDesc());
SessionUser user = (SessionUser) httpSession.getAttribute("user");
if(user != null) {
model.addAttribute("userName", user.getName());
}
return "index";
}
}
에러 발생
-> 자세히 살펴보면 service/posts의 PostsService.java가 없어 발생했음을 알 수 있다.
-> 해결
1) service/posts 패키지 생성 & PostsService.java 작성
2) 그 과정에서 이렇게 import 하기 위한 파일들을 모두 생성해줘야 한다.
(이 부분은 기준으로 보고 했던 블로그에는 내용이 없어 찾았다.)
참고 깃허브 링크 : https://github.com/gkdud583/freelec-springboot2-webservice
- PostsService.java 코드
package com.example.OAuth2Login.service.posts;
import com.example.OAuth2Login.domain.posts.Posts;
import com.example.OAuth2Login.domain.posts.PostsRepository;
import com.example.OAuth2Login.web.dto.PostsListResponseDto;
import com.example.OAuth2Login.web.dto.PostsResponseDto;
import com.example.OAuth2Login.web.dto.PostsSaveRequestDto;
import com.example.OAuth2Login.web.dto.PostsUpdateRequestDto;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.stream.Collectors;
@RequiredArgsConstructor
@Service
public class PostsService {
private final PostsRepository postsRepository;
@Transactional
public Long save(PostsSaveRequestDto requestDto){
return postsRepository.save(requestDto.toEntity()).getId();
}
@Transactional
public Long update(Long id, PostsUpdateRequestDto requestDto){
Posts posts = postsRepository.findById(id)
.orElseThrow(() -> new IllegalArgumentException(("해당 게시글이 없습니다. id="+id)));
posts.update(requestDto.getTitle(), requestDto.getContent());
return id;
}
public PostsResponseDto findById(Long id){
Posts entity = postsRepository.findById(id)
.orElseThrow(() -> new IllegalArgumentException("해당 게시글이 없습니다. id="+id));
return new PostsResponseDto(entity);
}
@Transactional(readOnly = true)
public List<PostsListResponseDto> findAllDesc(){
return postsRepository.findAllDesc().stream()
.map(PostsListResponseDto::new)
.collect(Collectors.toList());
}
@Transactional
public void delete(Long id){
Posts posts = postsRepository.findById(id)
.orElseThrow(() -> new IllegalArgumentException("해당 게시글이 없습니다. id=" + id));
postsRepository.delete(posts);
}
}
- indexController.java 코드
package com.example.OAuth2Login.web;
import com.example.OAuth2Login.config.auth.LoginUser;
import com.example.OAuth2Login.config.auth.dto.SessionUser;
import com.example.OAuth2Login.service.posts.PostsService;
import com.example.OAuth2Login.web.dto.PostsResponseDto;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@RequiredArgsConstructor
@Controller
public class IndexController {
private final PostsService postsService;
@GetMapping("/")
public String index(Model model, @LoginUser SessionUser user){
model.addAttribute("posts", postsService.findAllDesc());
if(user != null){
model.addAttribute("userName", user.getName());
}
return "index";
}
@GetMapping("/posts/save")
public String postsSave(){
return "posts-save";
}
@GetMapping("/posts/update/{id}")
public String postsUpdate(@PathVariable Long id, Model model){
PostsResponseDto dto = postsService.findById(id);
model.addAttribute("post", dto);
return "posts-update";
}
}
테스트
-> 테스트 실패
"2023-01-25T17:25:26.807+09:00 ERROR 17460 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization."
이 부분에서 타임아웃으로 에러가 발생하는 듯 한데....
어떻게 처리해야할지 고민이다.
- 에러 로그 전문
"C:\Program Files\Java\jdk-17.0.5\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:57592,suspend=y,server=n -javaagent:C:\Users\dlgkd\AppData\Local\JetBrains\IdeaIC2022.3\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Users\dlgkd\OneDrive\바탕 화면\OAuth2Login\out\production\classes;C:\Users\dlgkd\OneDrive\바탕 화면\OAuth2Login\out\production\resources;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web\3.0.2\3f6a2cb4cb11bac3611f5a95e234589eb190dd29\spring-boot-starter-web-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-data-jpa\3.0.2\fc0dbe82effb33d3d89b4cf2ec6b7968ad2af558\spring-boot-starter-data-jpa-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-jdbc\3.0.2\662285456edce14301de88fc0ab4937643a51b50\spring-boot-starter-jdbc-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-oauth2-client\3.0.2\f2040c40dd86f8d1e402d0d06ff162f2d4194b38\spring-boot-starter-oauth2-client-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter\3.0.2\a9426629b5a83ad64fbe4e1d24081cccf4cdab14\spring-boot-starter-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-json\3.0.2\11b9a2903af9014696d2576605bb73e8bca6ee19\spring-boot-starter-json-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat\3.0.2\4d50f0cdcb4b8f74221ae823dd77c18290473045\spring-boot-starter-tomcat-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc\6.0.4\84ee8a9107480c92186ef8216ba0e1dca6ee1665\spring-webmvc-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\6.0.4\de18e3e75a0e56534d9df5978bd2f43f950e1b4a\spring-web-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.mysql\mysql-connector-j\8.0.32\41ec3f8cdaccf6c46a47d7cd628eeb59a926d9d4\mysql-connector-j-8.0.32.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-aop\3.0.2\cfb3ff6a7f8d47c9703f140387f39a837b81ab52\spring-boot-starter-aop-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.hibernate.orm\hibernate-core\6.1.6.Final\e2ff7dfc50d16377da7bedbf48a0a2e9db30ac66\hibernate-core-6.1.6.Final.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\3.0.1\96f4ea7c780b6c902f83f4fd3c98dffe3ac5fbec\spring-data-jpa-3.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aspects\6.0.4\5baf7a2260278ca9748be9dd8278d6519ff2da00\spring-aspects-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP\5.0.1\a74c7f0a37046846e88d54f7cb6ea6d565c65f9c\HikariCP-5.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\6.0.4\97304a02dec542762c19a7b39e1124f1714f7be9\spring-jdbc-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-oauth2-client\6.0.1\8426e276ce3a840f1d1eafb3af90567c9686fafd\spring-security-oauth2-client-6.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-oauth2-jose\6.0.1\90f1aa9e212ed86d65fa7adf1b6dc07e4077aa54\spring-security-oauth2-jose-6.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-config\6.0.1\30cbecc3573f430aa2fc25f5f6be5c1662184efe\spring-security-config-6.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-core\6.0.1\7d54b69c31cee7ff8d68dfb852cd904ed65af3cd\spring-security-core-6.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure\3.0.2\42ad589ec930e05a2ed702a4940955ff97b16a8c\spring-boot-autoconfigure-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\3.0.2\69d2e0a07f7df180a4aacdc47c47a3db656857dc\spring-boot-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging\3.0.2\1c5c71058a0297534d5c5f33a5d125bbbdb6a390\spring-boot-starter-logging-3.0.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\2.1.1\48b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\6.0.4\8e24ad493887023cf5fac93541c72516f8ed9f6a\spring-core-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.33\2cd0a87ff7df953f810c344bdf2fe3340b954c69\snakeyaml-1.33.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\2.14.1\f24e8cb1437e05149b7a3049ebd6700f42e664b1\jackson-datatype-jsr310-2.14.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-parameter-names\2.14.1\2e05a86dba3d4b05074b6a313c4d5b7ff844c8dd\jackson-module-parameter-names-2.14.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\2.14.1\da194197d187bf24a8699514344ebf0abd7c342a\jackson-datatype-jdk8-2.14.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.14.1\268524b9056cae1211b9f1f52560ef19347f4d17\jackson-databind-2.14.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket\10.1.5\14529cbd593571dc9029272ddc9166b5ef113fc2\tomcat-embed-websocket-10.1.5.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\10.1.5\21417d3ef8189e2af05aae0a765ad9204d7211b5\tomcat-embed-core-10.1.5.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\10.1.5\c125df13af42a0fc0cd342370449b1276181e2a1\tomcat-embed-el-10.1.5.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\6.0.4\4fffcbb7eb4f1e9f1a4c9d3ca60098f7c063fc05\spring-context-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\6.0.4\c47b65c09a5a6fc41293b6aa981fcbe24a3adcd0\spring-aop-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\6.0.4\7d903607ecfcdefccd0d48aea8724632479b3e83\spring-beans-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\6.0.4\a908e6d3c46fcd6b58221d8427bbaf284bbbee0c\spring-expression-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation\1.10.3\32cc59dc8b5f00fba9fa88b7139898b0f7905db7\micrometer-observation-1.10.3.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.19\afbffb1210239fbba5cad73093c5b216d515838f\aspectjweaver-1.9.19.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\jakarta.persistence\jakarta.persistence-api\3.1.0\66901fa1c373c6aff65c13791cc11da72060a8d6\jakarta.persistence-api-3.1.0.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\2.0.1\51a520e3fae406abb84e2e1148e6746ce3f80a1a\jakarta.transaction-api-2.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\6.0.4\c9958d0879bdc05f7221c0b49d90a1b8825da540\spring-orm-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\3.0.1\a748e9d73fe23bec3a8604c68da74446a887d59\spring-data-commons-3.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\6.0.4\f8a50c2547179328a5f2202591d6341e3cbf1708\spring-tx-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.6\88c40d8b4f33326f19a7d3c0aaf2c7e8721d4953\slf4j-api-2.0.6.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-oauth2-core\6.0.1\18502f2e6892ca1120f7ac3fce280c948667487\spring-security-oauth2-core-6.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-web\6.0.1\3f0c00dcddb23941983f844cad3221141f1b873a\spring-security-web-6.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.nimbusds\oauth2-oidc-sdk\9.43.1\a25abc8ea0a91296063d55dbb57b698f81a4649c\oauth2-oidc-sdk-9.43.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.nimbusds\nimbus-jose-jwt\9.24.4\29a1f6a00a4daa3e1873f6bf4f16ddf4d6fd6d37\nimbus-jose-jwt-9.24.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-crypto\6.0.1\2384513fec136174d4be8ebaf3a2cf9aecef5416\spring-security-crypto-6.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.4.5\28e7dc0b208d6c3f15beefd73976e064b4ecfa9b\logback-classic-1.4.5.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.19.0\30f4812e43172ecca5041da2cb6b965cc4777c19\log4j-to-slf4j-2.19.0.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.slf4j\jul-to-slf4j\2.0.6\c4d348977a83a0bfcf42fd6fd1fee6e7904f1a0c\jul-to-slf4j-2.0.6.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\6.0.4\2d6523d00fc40cdb2c2f409113447940d2c872b5\spring-jcl-6.0.4.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.14.1\2a6ad504d591a7903ffdec76b5b7252819a2d162\jackson-annotations-2.14.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.14.1\7a07bc535ccf0b7f6929c4d0f2ab9b294ef7c4a3\jackson-core-2.14.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons\1.10.3\334080a1a6b849d09d3ef96d7b243fc3c16b2e5a\micrometer-commons-1.10.3.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.github.stephenc.jcip\jcip-annotations\1.0-1\ef31541dd28ae2cefdd17c7ebf352d93e9058c63\jcip-annotations-1.0-1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.nimbusds\content-type\2.2\9a894bce7646dd4086652d85b88013229f23724b\content-type-2.2.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\net.minidev\json-smart\2.4.8\7c62f5f72ab05eb54d40e2abf0360a2fe9ea477f\json-smart-2.4.8.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.nimbusds\lang-tag\1.7\97c73ecd70bc7e8eefb26c5eea84f251a63f1031\lang-tag-1.7.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.4.5\e9bb2ea70f84401314da4300343b0a246c8954da\logback-core-1.4.5.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.19.0\ea1b37f38c327596b216542bc636cfdc0b8036fa\log4j-api-2.19.0.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\net.minidev\accessors-smart\2.4.8\6e1bee5a530caba91893604d6ab41d0edcecca9a\accessors-smart-2.4.8.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\9.1\a99500cf6eea30535eeac6be73899d048f8d12a8\asm-9.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.5.0.Final\c19307cc11f28f5e2679347e633a3294d865334d\jboss-logging-3.5.0.Final.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\6.0.2.Final\fa5a14ef3d2e5c3c99b53a4bef756a3268d69187\hibernate-commons-annotations-6.0.2.Final.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.jboss\jandex\2.4.2.Final\1e1c385990b258ff1a24c801e84aebbacf70eb39\jandex-2.4.2.Final.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.5.1\3fe0bed568c62df5e89f4f174c101eab25345b6c\classmate-1.5.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.12.22\984e536b4f3fb668b21f15b90c1e8704292d4bdd\byte-buddy-1.12.22.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\4.0.1\7abfa1ee788a8f090dc598c45876ef068731e72b\jaxb-runtime-4.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\jakarta.xml.bind\jakarta.xml.bind-api\4.0.0\bbb399208d288b15ec101fa4fcfc4bd77cedc97a\jakarta.xml.bind-api-4.0.0.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\jakarta.inject\jakarta.inject-api\2.0.0\46fc8560b6fd17b78396d88f39c1a730457671f0\jakarta.inject-api-2.0.0.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-runtime\4.10.1\10839f875928f59c622d675091d51a43ea0dc5f7\antlr4-runtime-4.10.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-core\4.0.1\b4707bb31dfcf54ae424b930741f0cd62d672af9\jaxb-core-4.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\jakarta.activation\jakarta.activation-api\2.1.1\88c774ab863a21fb2fc4219af95379fafe499a31\jakarta.activation-api-2.1.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.eclipse.angus\angus-activation\1.0.0\f0ceddd49f92109fbfad9125e958f5bfd3f2aa1\angus-activation-1.0.0.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\4.0.1\797720dfe2e15504f6014fb82eb873051a653c75\txw2-4.0.1.jar;C:\Users\dlgkd\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\4.1.1\9b3769c76235bc283b060da4fae2318c6d53f07e\istack-commons-runtime-4.1.1.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.1\lib\idea_rt.jar" com.example.OAuth2Login.OAuth2LoginApplication
Connected to the target VM, address: '127.0.0.1:57592', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.2)
2023-01-25T17:37:51.223+09:00 INFO 23564 --- [ main] c.e.OAuth2Login.OAuth2LoginApplication : Starting OAuth2LoginApplication using Java 17.0.5 with PID 23564 (C:\Users\dlgkd\OneDrive\바탕 화면\OAuth2Login\out\production\classes started by dlgkd in C:\Users\dlgkd\OneDrive\바탕 화면\OAuth2Login)
2023-01-25T17:37:51.228+09:00 INFO 23564 --- [ main] c.e.OAuth2Login.OAuth2LoginApplication : The following 1 profile is active: "oauth"
2023-01-25T17:37:52.015+09:00 INFO 23564 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2023-01-25T17:37:52.094+09:00 INFO 23564 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 68 ms. Found 2 JPA repository interfaces.
2023-01-25T17:37:52.790+09:00 INFO 23564 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2023-01-25T17:37:52.802+09:00 INFO 23564 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2023-01-25T17:37:52.802+09:00 INFO 23564 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.5]
2023-01-25T17:37:52.940+09:00 INFO 23564 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2023-01-25T17:37:52.942+09:00 INFO 23564 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1658 ms
2023-01-25T17:37:53.143+09:00 INFO 23564 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2023-01-25T17:37:53.208+09:00 INFO 23564 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.1.6.Final
2023-01-25T17:37:53.391+09:00 WARN 23564 --- [ main] org.hibernate.orm.deprecation : HHH90000021: Encountered deprecated setting [javax.persistence.sharedCache.mode], use [jakarta.persistence.sharedCache.mode] instead
2023-01-25T17:37:53.534+09:00 INFO 23564 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2023-01-25T17:37:54.625+09:00 ERROR 23564 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:824) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:100) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-5.0.1.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:284) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:177) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:36) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:119) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:255) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:230) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.model.relational.Database.<init>(Database.java:44) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:218) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:191) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:138) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1797) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1747) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1130) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:905) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.2.jar:3.0.2]
at com.example.OAuth2Login.OAuth2LoginApplication.main(OAuth2LoginApplication.java:11) ~[classes/:na]
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[na:na]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.NativeSession.connect(NativeSession.java:120) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:944) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:814) ~[mysql-connector-j-8.0.32.jar:8.0.32]
... 47 common frames omitted
Caused by: java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na]
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:633) ~[na:na]
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:153) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63) ~[mysql-connector-j-8.0.32.jar:8.0.32]
... 50 common frames omitted
2023-01-25T17:37:54.631+09:00 WARN 23564 --- [ main] o.h.e.j.e.i.JdbcEnvironmentInitiator : HHH000342: Could not obtain connection to query metadata
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:824) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:444) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:237) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:100) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112) ~[HikariCP-5.0.1.jar:na]
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcEnvironmentInitiator.java:284) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:177) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:36) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:119) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:255) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:230) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.model.relational.Database.<init>(Database.java:44) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:218) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:191) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:138) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1797) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1747) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1130) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:905) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.2.jar:3.0.2]
at com.example.OAuth2Login.OAuth2LoginApplication.main(OAuth2LoginApplication.java:11) ~[classes/:na]
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[na:na]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.NativeSession.connect(NativeSession.java:120) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:944) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:814) ~[mysql-connector-j-8.0.32.jar:8.0.32]
... 47 common frames omitted
Caused by: java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na]
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:633) ~[na:na]
at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:153) ~[mysql-connector-j-8.0.32.jar:8.0.32]
at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63) ~[mysql-connector-j-8.0.32.jar:8.0.32]
... 50 common frames omitted
2023-01-25T17:37:54.634+09:00 ERROR 23564 --- [ main] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
2023-01-25T17:37:54.635+09:00 WARN 23564 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
2023-01-25T17:37:54.637+09:00 INFO 23564 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2023-01-25T17:37:54.648+09:00 INFO 23564 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2023-01-25T17:37:54.666+09:00 ERROR 23564 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1751) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1130) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:905) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:584) ~[spring-context-6.0.4.jar:6.0.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) ~[spring-boot-3.0.2.jar:3.0.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) ~[spring-boot-3.0.2.jar:3.0.2]
at com.example.OAuth2Login.OAuth2LoginApplication.main(OAuth2LoginApplication.java:11) ~[classes/:na]
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:267) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:230) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:207) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.model.relational.Database.<init>(Database.java:44) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.getDatabase(InFlightMetadataCollectorImpl.java:218) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:191) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:138) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1350) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1421) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:66) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:376) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:352) ~[spring-orm-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1797) ~[spring-beans-6.0.4.jar:6.0.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1747) ~[spring-beans-6.0.4.jar:6.0.4]
... 16 common frames omitted
Caused by: org.hibernate.HibernateException: Unable to determine Dialect without JDBC metadata (please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect')
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:147) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:60) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:244) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:36) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:119) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:255) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
... 31 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:57592', transport: 'socket'
Process finished with exit code 1
오후 5시 43분 성공
환경변수 편집
이름 지정을 해주고 value 작성에서 DB의 URL을 기본 포트인 80을 :80 이렇게 작성했다가, 지워버리고 다시 했더니 성공한 것 같다.
현재 상황(~ 2021.01.25 자정)
-> SecurityConfig.java 파일
해당 부분은 인증과 관련없이 uri를 요청하면 그냥 바로 요청에 응답해주는 것
-> 해당 부분은 해당 uri 요청 시 인증을 ignore 해주는 것
2. index.mustache을 찾지 못하는 문제
mustache 플러그인 설치 & build.gradle에 추가함.
그럼에도 불구하고 안됨.
내 생각 -> 에러 로그의 이 부분때문에 안되고, 이 프로젝트가 index.mustache를 매핑하지 못하는 것 같다..
해결해보자..
1) shift + shift -> mustache 검색 -> 맨 아래 줄 친 부분 클릭
2) 들어가서 해당 부분 찍기
3) 디버그 버튼 클릭 해 서버 구동
4) localhost:8080 다시 접속하고, 다시 프로젝트로 돌아와서 Debugger 보기
5) 결과
-> 내일 다시 이 부분에 대해서 파봐야할 것 같다.
지금까지 참고한 링크 모두 복붙
https://itstudy-mary.tistory.com/173
https://yeahajeong.tistory.com/48
https://www.google.com/search?q=%EC%8A%A4%ED%94%84%EB%A7%81+createviewname&oq=%EC%8A%A4%ED%94%84%EB%A7%81+createviewname&aqs=chrome..69i57j0i546l2j0i30i546.7660j0j7&sourceid=chrome&ie=UTF-8
https://srzero.tistory.com/entry/Spring-Multi-Resolver-%EA%B5%AC%ED%98%84
https://www.inflearn.com/questions/213225/%ED%9A%8C%EC%9B%90-%EA%B8%B0%EB%8A%A5-%ED%85%8C%EC%8A%A4%ED%8A%B8-%EB%AC%B8%EC%9D%98-%EB%93%9C%EB%A6%BD%EB%8B%88%EB%8B%A4
https://blog-001.tistory.com/10
https://blog.naver.com/chogar/221925309816
http://yoonbumtae.com/?p=3541
https://dev-coco.tistory.com/85
https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbY4kj3%2FbtradRNxaEs%2FNFhdzcemKnRfdZAp1bMfuk%2Fimg.png
https://www.google.com/search?q=xampp+mysql+workbench+%EC%82%AC%EC%9A%A9&sxsrf=AJOqlzU-aLf7G7TR3T8g_N99_djZbY8kew%3A1674634806295&ei=NubQY9y-EcKu2roPjpyfuAI&ved=0ahUKEwjcsYfmpOL8AhVCl1YBHQ7OBycQ4dUDCA8&uact=5&oq=xampp+mysql+workbench+%EC%82%AC%EC%9A%A9&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIFCCEQoAEyBQghEKABOgQIABBHOgUIABCABDoECAAQHjoGCAAQCBAeOgYIABAFEB5KBAhBGABKBAhGGABQuQNY8Qhg0ApoAXACeACAAZ8BiAHDBZIBAzAuNpgBAKABAcgBCsABAQ&sclient=gws-wiz-serp
https://kth990303.tistory.com/307
https://adunhansa.tistory.com/349
https://www.inflearn.com/questions/31659/login-%EA%B5%AC%ED%98%84%ED%95%A0%EB%95%8C
https://dev-coco.tistory.com/128
https://www.google.com/search?q=%EC%8A%A4%ED%94%84%EB%A7%81+%EC%86%8C%EC%85%9C%EB%A1%9C%EA%B7%B8%EC%9D%B8+%EA%B5%AC%EA%B8%80+%EB%A1%9C%EA%B7%B8%EC%9D%B8+%ED%99%94%EB%A9%B4+%EB%82%98%EC%98%B4&sxsrf=AJOqlzUSgDc3qaxxe4vO1andEa9F_h95jA%3A1674644373840&ei=lQvRY5vuMry22roPwKO54Ao&ved=0ahUKEwjbjJy4yOL8AhU8m1YBHcBRDqwQ4dUDCA8&uact=5&oq=%EC%8A%A4%ED%94%84%EB%A7%81+%EC%86%8C%EC%85%9C%EB%A1%9C%EA%B7%B8%EC%9D%B8+%EA%B5%AC%EA%B8%80+%EB%A1%9C%EA%B7%B8%EC%9D%B8+%ED%99%94%EB%A9%B4+%EB%82%98%EC%98%B4&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIECCEQFTIECCEQFToKCAAQRxDWBBCwAzoECCMQJ0oECEEYAEoECEYYAFD3B1jMC2CkDGgCcAF4AYABswGIAbEFkgEDMC41mAEAoAEByAEKwAEB&sclient=gws-wiz-serp
https://velog.io/@persestitan/Spring-Security-3.0.0%EB%B2%84%EC%A0%84%EC%97%90%EC%84%9C%EC%8A%A4%ED%94%84%EB%A7%81-%EC%8B%9C%ED%81%90%EB%A6%AC%ED%8B%B0-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0
https://zhfvkq.tistory.com/23
https://samtao.tistory.com/73
https://withbbang.tistory.com/entry/%EB%A7%88%EC%9D%B4%ED%81%AC%EB%A1%9C%EC%86%8C%ED%94%84%ED%8A%B8-%EC%97%A3%EC%A7%80Edge-%EC%9D%B8%ED%84%B0%EB%84%B7-%EA%B2%80%EC%83%89%EA%B8%B0%EB%A1%9D%EB%B0%A9%EB%AC%B8%EA%B8%B0%EB%A1%9D-%EC%9E%90%EB%8F%99-%EC%82%AD%EC%A0%9C-%EC%84%A4%EC%A0%95-%EB%B0%A9%EB%B2%95
https://velog.io/@swchoi0329/%EC%8A%A4%ED%94%84%EB%A7%81-%EC%8B%9C%ED%81%90%EB%A6%AC%ED%8B%B0%EC%99%80-OAuth-2.0%EC%9C%BC%EB%A1%9C-%EB%A1%9C%EA%B7%B8%EC%9D%B8-%EA%B8%B0%EB%8A%A5-%EA%B5%AC%ED%98%84
https://www.google.com/search?q=%22ERROR%22+dispatch+for+GET+%22/error%3Fcontinue%22,+parameters%3D%7Bmasked%7D&sxsrf=AJOqlzU02mBQAXcVxMTdaZi_1JG_nLDQlQ:1674652560293&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjOyOn35uL8AhWLh1YBHYk-BWgQ_AUoAnoECAEQBA&biw=1920&bih=929&dpr=1#imgrc=Ql4p5dU2e8fESM
https://supawer0728.github.io/2019/04/04/spring-error-handling/
https://datamoney.tistory.com/333
https://github.com/gkdud583/freelec-springboot2-webservice/tree/master/src/main/resources/templates
https://myeongju00.tistory.com/51?category=1026256
https://velog.io/@pjh612/Deprecated%EB%90%9C-WebSecurityConfigurerAdapter-%EC%96%B4%EB%96%BB%EA%B2%8C-%EB%8C%80%EC%B2%98%ED%95%98%EC%A7%80
https://blog.userinsight.co.kr/26
https://stackoverflow.com/questions/74683225/updating-to-spring-security-6-0-replacing-removed-and-deprecated-functionality
https://itjy2.tistory.com/115
https://www.google.com/search?q=private+field+%27postService%27+is+assigned+but+never+accessed&oq=private+field+%27postService%27+is+assigned+but+never+accessed&aqs=chrome..69i57j33i10i160.21402j1j7&sourceid=chrome&ie=UTF-8
https://goddaehee.tistory.com/210
https://www.google.com/search?q=%EC%8A%A4%ED%94%84%EB%A7%81+Completed+500+INTERNAL_SERVER_ERROR&sxsrf=AJOqlzUJsj7Cy1ZJ63hEakJsj2wTI_XSag%3A1674639108268&ei=BPfQY7yDEKiM2roPybKY2AQ&ved=0ahUKEwi8lbPptOL8AhUohlYBHUkZBksQ4dUDCA8&uact=5&oq=%EC%8A%A4%ED%94%84%EB%A7%81+Completed+500+INTERNAL_SERVER_ERROR&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIFCAAQogQyBQgAEKIEMgUIABCiBDoECCMQJzoGCAAQBxAeOggIABAHEB4QCjoJCAAQBxAeEPEESgQIQRgASgQIRhgAUABYxA5gxw9oA3ABeASAAagBiAGdDJIBBDEuMTKYAQCgAQHAAQE&sclient=gws-wiz-serp
https://velog.io/@kwakwoohyun/%EC%9D%B4%EC%8A%88%EC%B2%98%EB%A6%AC-OAuth2-google-login-400-redirecturimismatch
https://www.google.com/search?q=%EC%8A%A4%ED%94%84%EB%A7%81+%EC%8B%9C%ED%81%90%EB%A6%AC%ED%8B%B0+%EB%A3%A8%ED%8A%B8%ED%8E%98%EC%9D%B4%EC%A7%80+%EC%9D%B8%EC%A6%9D+%EC%95%88%ED%95%98%EA%B2%8C&sxsrf=AJOqlzUnSA0pDtZGL1o72cIyffgd0MiArA%3A1674644922087&ei=ug3RY_zvBM_M2roPtfCVsA0&ved=0ahUKEwj8tNK9yuL8AhVPplYBHTV4BdYQ4dUDCA8&uact=5&oq=%EC%8A%A4%ED%94%84%EB%A7%81+%EC%8B%9C%ED%81%90%EB%A6%AC%ED%8B%B0+%EB%A3%A8%ED%8A%B8%ED%8E%98%EC%9D%B4%EC%A7%80+%EC%9D%B8%EC%A6%9D+%EC%95%88%ED%95%98%EA%B2%8C&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIFCCEQoAE6CggAEEcQ1gQQsAM6BAgjECdKBAhBGABKBAhGGABQvApYww1giA9oAnABeAGAAZ4BiAGnBZIBAzAuNZgBAKABAcgBBMABAQ&sclient=gws-wiz-serp
프로젝트 파일
OAuth2Login.zip