SpringBoot异常:Error creating bean with name 'entityManagerFactory' defined in class path resource

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yhzhaohy/article/details/78133415

 

使用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等号两边的空格去掉即可
 

 

 

 

展开阅读全文

没有更多推荐了,返回首页