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 ...
随机推荐
- linux下mysql数据库导入导出命令
首先linux 下查看mysql相关目录root@ubuntu14:~# whereis mysqlmysql: /usr/bin/mysql---- mysql的运行路径 /etc/mysql ...
- Opencv3_Learning
git地址 采用jupyter notebook进行编程,语言为python. 感谢博主--戳 这类东西真的是不是天天打,就是打过就忘.. 有志者事竟成,破釜沉舟,百二秦关终属楚. 苦心人天不负,卧薪 ...
- python 通过列表元素值截取列表并获取长度
def count_range_in_list(li, min, max): ctr = for x in li: if min <= x <= max: ctr += return ct ...
- RabbitMQ入门_02_HelloWorld
A. AMQP基础 RabbitMQ 并不是基于 Java 开发人员熟悉的 JMS 规范设计开发的,而是基于一个比 JMS 更新更合理的 AMQP (Advanced Message Queuing ...
- js的数组与对象关系
有的时候总犯糊涂,不理解对象和数组的关系,转载一篇文章,深刻记忆一下 http://hi.baidu.com/samdan/item/05179313d1ee4b9e99ce3371 比如有一个数组a ...
- canvas绘制进度条(wepy)
<template> <canvas canvas-id="canvas" style="width:{{width+10}}px;height:{{w ...
- NYOJ 720 DP+二分
项目安排 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 小明每天都在开源社区上做项目,假设每天他都有很多项目可以选,其中每个项目都有一个开始时间和截止时间,假设做完每个 ...
- 出错的sql
alter table m_account AUTO_INCREMENT=200029860;
- wikioi 1021 玛丽卡
链接:http://wikioi.com/problem/1021/ 这题挺有意思的,虽然比较水,但是让我想起来那次百度or腾讯的一道最大流的题目,很给力,也是对最后找边进行优化,不过这题比那题简单多 ...
- MarkdownPad2 下一些设置
MarkdownPad2注册码: 邮箱: Soar360@live.com 授权秘钥: GBPduHjWfJU1mZqcPM3BikjYKF6xKhlKIys3i1MU2eJHqWGImDHzWdD6 ...