使用springboot持久化时,遇到异常:
Error creating bean with name 'entityManagerFactory' defined in class path resource
Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.hibernate.dialect.MySQL5Dialect ] as strategy
解决办法:
在application.properties属性文件中,多空格
原来的:
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
把org.hibernate.dialect.MySQL5Dialect等号两边的空格去掉即可