Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to resolve name [org.hibernate.dialect.MYSQL5Dialect] as strategy [org.hibernate.dialect.Dialect]

I have configured it like this.why do i report the above error?

spring.jpa.show-sql = true
logging.level.org.springframework.data=DEBUG
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.hibernate.namingstrategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MYSQL5Dialect
like image 872
hellolee Avatar asked Oct 19 '25 14:10

hellolee


2 Answers

You have a typo in your configuration

The correct one should be

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
like image 127
Deb Avatar answered Oct 21 '25 02:10

Deb


In the latest versions of Java, It removes MySQL5Dialect or MySQL8Dialect Instead of Using Theses,

Try to Use This

spring.jpa.properties.hibernate.dialect=org.hibernate.cj.dialect.MySQLDialect
like image 33
Arun Chouhan Avatar answered Oct 21 '25 03:10

Arun Chouhan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!