配置之MySQL5Dialect

报错:

 org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

  org.hibernate.boot.registry.selector.StrategySelectionException:  Unable to resolve name [MySQL5Dialect] as strategy [org.hibernate.dialect.Dialect]

MySQL驱动器的包配置出错.正确的MySQL驱动器的包是这样配置的:
在application.properties配置:
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
或者<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
报的错就是无法解析数据库方言 .不同的数据库,sql语句不同,Hibernate相当于一个翻译,配置“方言”选项,就是告诉Hibernate使用的是哪种方言(哪个数据库的sql语句)
所以查看自己的配置有没有出错,我就是把
MySQL5Dialect 中的MySQL中的小写y,写成了大写的Y,就成了MYSQL,所以出错,怪自己粗心,没经验,就是觉得配置没错找了好久,才发现,也是蠢得可以了!
原文地址:https://www.cnblogs.com/fulse/p/8623795.html