SMALL
프로젝트 만드는 중에 Mysql8.0.33 버전을 사용중에 평소와 다른 오류가 생겼다.
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.MySQL5InnoDBDialect] as strategy [org.hibernate.dialect.Dialect]
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/board
username: root
password: 1234
jpa:
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
open-in-view: false
show-sql: true
hibernate:
ddl-auto: create-drop
여기서 오류가 난것인데
* database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
부분 때문에 오류가 발생한다.
Hibernate 6부터는 버전검색 안해도 되도록 통일 시킨거 같다.
https://docs.jboss.org/hibernate/orm/6.0/migration-guide/migration-guide.html#_dialects
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/board
username: root
password: 1234
jpa:
database-platform: org.hibernate.dialect.MySQLDialect
open-in-view: false
show-sql: true
hibernate:
ddl-auto: create-drop
* database-platform: org.hibernate.dialect.MySQLDialect
이렇게 변경하면 된다.
LIST