JPA Error creating bean with name defined in class path resource;Invocation of init method fail问题解决
问题描述:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/Hibern
·
问题描述:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed;
问题分析:
1、Spring Boot配置里面没有设置数据库类型,导致报错。
解决办法:
(1)使用spring.datasource.platform设置数据库类型。
spring.datasource.platform = mysql
(2)使用spring.jpa.database设置数据库类型。
spring.jpa.database = mysql
更多推荐
已为社区贡献4条内容
所有评论(0)