springboot启动时的一个bug
项目启动就有这个错 Error creating bean with name 'XXXXXXXX': Cannot create inner bean '(inner bean)#1f930774' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager
- 这虽然是个警告但是就是起不来
2019-06-16 22:13:58.504 WARN 28636 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'XXXXXXXX': Unsatisfied dependency expressed through field 'XXXXXXXX'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'XXXXXXXX': Unsatisfied dependency expressed through field 'XXXXXXXX'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XXXXXXXX': Cannot create inner bean '(inner bean)#1f930774' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1f930774': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' available - 现在的启动项是这样的
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
@EnableDiscoveryClient
@EnableFeignClients
@Slf4j - 原来的启动项是这样的
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
@ComponentScan(basePackages = {"cn.enn.advisor"})
@EnableAutoConfiguration
@EnableDiscoveryClient
@EnableFeignClients
@Slf4j - @SpringBootApplication 虽然这个注解包含了 @ComponentScan @ EnableAutoConfiguration @Configuration
但是不加就是会报错,这里记录一下,找到原因再更新
转载于:https://www.cnblogs.com/thymeleaf/p/11037300.html
springboot启动时的一个bug相关推荐
- 启动rrt什么意思_面试官:你来说一下springboot启动时的一个自动装配过程吧!...
前言 继续总结吧,没有面试就继续夯实自己的基础,前阵子的在面试过程中遇到的各种问题陆陆续续都会总结出来分享给大家,这次要说的也是面试中被问到的一个高频的问题,我当时其实没答好,因为很早之前是看过spr ...
- springboot启动时控制台打印图案
springboot启动时控制台打印图案如下: 1.假如我们不想看到这个图案 public static void main(String[] args) {SpringApplication app ...
- SpringBoot启动时就会自动去连接mongdo DB指向的url
SpringBoot启动时就会去连接mongdo DB指向的url:
- Springboot 启动时Bean初始化,启动异常-Assert.isTrue(condition,message) 报错
Springboot 启动时Bean初始化启动异常Assert.isTrue(condition,message) 报错,如果 condition为false 则会出现 java.lang.Illeg ...
- SpringBoot启动时 提示没有主清单属性 MANIFEST
SpringBoot启动时 提示没有主清单属性 MANIFEST <?xml version="1.0" encoding="UTF-8"?>< ...
- SpringBoot启动时将数据库数据加载到内存
文章目录 为什么需要将参数存入缓存?以及选择何种方式 SpringBoot启动时将数据库参数表参数加载到内存 常见思路 思路1: 使用@PostConstruct 思路2: 实现CommandLine ...
- SpringBoot启动时实现自动执行代码的几种方式讲解
点击关注公众号,实用技术文章及时了解 来源:blog.csdn.net/u011291072/article/ details/81813662 前言 目前开发的SpringBoot项目在启动的时候需 ...
- 如何在SpringWEB项目或者Springboot启动时直接执行业务代码(三种方式)
我的博客原文链接 前言 通常的我们的项目开发中,经常会遇到那种在服务一启动就需要自动执行一些业务代码的情况.比如将数据库中的配置信息或者数据字典之类的缓存到redis,或者在服务启动的时候将一些配置化 ...
- springboot启动时初始化sql脚本
文章目录 1.初始化mysql数据库脚本 1.使用springboot jdbc初始化数据库 2.使用原生mybatis执行sql脚本 3.改良springboot jdbc初始化数据库 参考地址 基 ...
最新文章
- 初识广度优先搜索与解题套路
- python有哪些关键字?让他自己“吐”出来!
- 怎么用爬虫筛选简历_Python爬虫面试简历
- Dropbox 的用户付费账户降级策略
- 线性结构(顺序存储和链式存储)和非线性结构的特点及区别
- 网格自适应_Abaqus网格重划自适应技术
- linux微信公众号报警,zabbix报警媒介,微信报警,邮件报警
- 解决安装Tuxera NTFS For Mac后依旧无法写入的问题
- IDEA 设置护眼色RGB值
- 网络工程师HCIE-RS-路由回馈问题(通俗易懂!)
- html/jsp如何固定图像的大小
- Acer4745G笔记本蓝牙驱动安装
- 红帽linux中文语言包,英文 RedHat AS5 中文语言包安装
- 【Microsoft Word 2010】页面部分双栏,添加脚注后导致双栏内容换页的解决方法
- 探真无阻塞加载javascript脚本技术,我们会发现很多意想不到的秘密
- matlab normx-x0_【 MATLAB 】norm ( Vector and matrix norms )(向量范数以及矩阵范数)
- Excel最大值和最小值的提取问题
- Windows 取证之ShellBags
- 容器化改造要怎么做?
- 三菱fx2nPLC自学笔记01
热门文章
- docker私有仓库Harbor 使用文档
- 2012-6-19 win7环境Jooma建站手记-解决问题
- 博文视点大讲堂第30期——职场新人胜出关键点
- 目标检测的稀疏对抗攻击,代码已开源
- BMVC 2020 各奖项公布!最佳论文可能就是你要的涨点神器
- 天津大学推出大型无人机航拍车辆数据集DroneVehicle
- ICCV 2019 | 旷视研究院提出文字检测新方法:像素聚合网络PAN
- 到底ResNet在解决一个什么问题呢?知乎热门回答
- CV Code | 本周新出计算机视觉开源代码汇总(南理SGE 和Intel的实时动作识别很吸引人)...
- 【OpenCV】OpenCV函数精讲之 -- 颜色空间缩减及LUT函数