application.yml 작성
spring:
h2:
console:
enabled: true
jpa:
generate-ddl: true
hibernate:
ddl-auto: create-drop
database: h2
show-sql: true
open-in-view: false
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
query.in_clause_parameter_padding: true
오류
Unable to resolve name [org.hibernate.dialect.MySQL5InnoDBDialect] as strategy [org.hibernate.dialect.Dialect]
Unable to load class [org.hibernate.dialect.MySQL5InnoDBDialect]Could not load requested class : org.hibernate.dialect.MySQL5InnoDBDialect
계속해서 MySQL5InnoDBDialect 이부분이 잘못되었음을 느끼고 구글링
스프링부트 버전이 업그레이드가 되면서 기존에 사용중이던 MySQL5InnoDBDialect 이 Deprecated(더 이상 사용되지 않는)가 된것
해결방안
properties.hibernate.dialect 부분에
org.hibernate.dialect.MySQL5InnoDBDialect부분을
org.hibernate.dialect.MySQL57Dialect으로 변경
해결!
구글링은 대다내,,,,><
'언어 > spring' 카테고리의 다른 글
[Spring Boot] Could not obtain connection to query metadata 오류 (0) | 2023.01.24 |
---|---|
[Spring Boot] JPA를 사용해야 하는 이유 (0) | 2023.01.24 |
[Springboot]Failed to initialize JPA EntityManagerFactory, Error creating bean with name 'entityManagerFactory' defined in class path resource 해결 (0) | 2023.01.23 |
[DB] 도커로 mysql 테이블 생성 (0) | 2023.01.18 |
[DB] docker mysql 포트문제 (0) | 2023.01.18 |