Spring Boot 报错:Error creating bean with name 'entityManagerFactory' defined in class path resource
spring boot 写一个web项目,在使用spring-data-jpa的时候,启动报如下错误:
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-04-02 17:00:47.076 ERROR 4648 --- [ main] o.s.boot.SpringApplication : Application startup failed
解决方式:加入依赖既可
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.0.3.Final</version>
</dependency>
另外,有看到资料说,在mainApplication中,加如下注解也可以解决:
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
启动的确不报错了,但是此时,自动创建表功能并未实现,建议用第一种方式。

Spring Boot 报错:Error creating bean with name 'entityManagerFactory' defined in class path resource的更多相关文章
- 使用SpringMVC报错 Error creating bean with name 'conversionService' defined in class path resource [springmvc.xml]
使用SpringMVC报错 Error creating bean with name 'conversionService' defined in class path resource [spri ...
- java数据库执行迁移报错Error creating bean with name 'flywayInitializer' defined in class path resource
报错原因 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayI ...
- idea报错 Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource
核对一下控制器是不是写了相同的路径...org.springframework.beans.factory.BeanCreationException: Error creating bean wit ...
- SpringBoot启动zipkin-server报错Error creating bean with name ‘armeriaServer’ defined in class path resource
目前,GitHub 上最新 release 版本是 Zipkin 2.12.9,从 2.12.6 版本开始有个较大的更新,迁移使用 Armeria HTTP 引擎. 从此版本开始,若直接添加依赖的 S ...
- Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method fail
SpringBoot 单元测试报错 @RunWith(SpringRunner.class) @SpringBootTest public class ProductCategoryRepositor ...
- Error creating bean with name 'entityManagerFactory' defined in class path resource解决方案
项目是集成了Spring Boot和Spring Data,然后昨天简单Jpa和Spring Boot配置完成,开始进行公司项目的重构,然后出现了这个问题.当时是在网上找了好久.后来发现时java ...
- spring boot 报错 Error creating bean with name
Application 启动类 要和父目录平级
- springboot启动报:Error creating bean with name 'dataSource' defined in class path resource
需要在启动类的@EnableAutoConfiguration或@SpringBootApplication中添加exclude = {DataSourceAutoConfiguration.clas ...
- spring cloud 报错Error creating bean with name 'hystrixCommandAspect' ,解决方案
spring cloud 升级到最新版 后,报错: org.springframework.beans.factory.BeanCreationException: Error creating be ...
随机推荐
- C++多线程学习资料参考
新的C++11语法:<Professional C++>,或<C ++ Primer Plus>: C++11多线程:<C++ Concurrency in Actio ...
- ngular6开发不完全笔记(二)-- 管道
自定义管道 管道(过滤器)为过滤数据显示下列list数据 pip.ts 文件 import { Pipe, PipeTransform } from '@angular/core'; import { ...
- Python3基础 三元运算符 简单示例
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- 从0开始学习 GITHUB 系列之「GITHUB 常见的几种操作」【转】
本文转载自:http://stormzhang.com/github/2016/09/21/learn-github-from-zero8/ 版权声明:本文为 stormzhang 原创文章,可以随意 ...
- Object.defineProperty和Object.defineProperties
添加属性到对象,或修改现有属性的特性 用法: Object.defineProperty(object, propertyName, descriptor); 参数: object ...
- [SpringBoot] - 配置文件的多种形式及优先级
学习两个注解: @PropertySource @ImportResource ↓ @ConfigurationProperties 与 @Bean 结合为属性赋值 与 ...
- about SpringBoot学习后记
<SpringBoot实战>第一章节入门的名称为Spring风云再起 看起来Spring的功能确实受Java开发者喜爱 在SpringBoot中,继续将Spring框架做了另一次的封装使框 ...
- [kata] Playing with digits
package kata_011; /** * Some numbers have funny properties. For example: * * 89 --> 8¹ + 9² = 89 ...
- hbase(三)coprocessor
介绍 coprocessor这个单词看起来很神秘,直译为协处理器,其实可以理解成依赖于regionserver进程的辅助处理接口. hbae在0.92版本之后提供了coprocessor接口.目前hb ...
- 使用 switch 对值进行分支
与处理 TRUE 和 FALSE 条件的 if 相比,switch 语句则是用来处理数字或者字符串,并根据输入返回某个分支.假设输入一个整数 n,switch 返回从第 1 个参数开始的第 n 个参数 ...