无法将名称 [org.hibernate.dialect.MYSQL5Dialect] 解析为策略 [org.hibernate.dialect.Dialect]

hel*_*lee 3 java hibernate spring-boot

我是这样配置的,为什么报上面的错误?

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
Run Code Online (Sandbox Code Playgroud)

Deb*_*was 5

你的配置有错别字

正确的应该是

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
Run Code Online (Sandbox Code Playgroud)