Search code examples
javahibernatespring-boot

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

Solution

  • You have a typo in your configuration

    The correct one should be

    spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect