Relying upon circular references is discouraged and they are prohibited by default 循环依赖bug解决
问题:
因为业务原因,将springboot升级到2.6.4,启动项目出现这样的bug
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
Action:
Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
出现bug的大概意思是:不鼓励依赖循环引用,默认情况下是禁止的,更新您的应用程序以删除bean之间的依赖循环。作为最后的手段,可以通过将 spring.main.allow-circular-references设置为true来自动终端循环。
bug解决
springboot2.6正式发布:循环依赖默认禁止。如上提供解决方案为将spring.main.allow-circular-references 设置为true,来自动中断循环。
如果是.properties文件,在文件中添加
spring.main.allow-circular-references=true
如果是.yml文件,则在文件中添加
spring:main:allow-circular-references:true
解决!
Relying upon circular references is discouraged and they are prohibited by default 循环依赖bug解决相关推荐
- Relying upon circular references is discouraged and they are prohibited by default.循环依赖bug解决
Relying upon circular references is discouraged and they are prohibited by default.循环依赖bug解决 bug展示 b ...
- Relying upon circular references is discouraged and they are prohibited by default.
解决升级 Spring Boot 2.6后,因循环引用导致启动时报错的问题 Relying upon circular references is discouraged and they are p ...
- SpringCloudAlibaba踩坑日记(二)Relying upon circular references is discouraged and they are prohibited by
文章目录 前因 报错内容 解决方案 前因 这俩天闲来无事想搭建一套最新版本的微服务,顺便写博客记录一下,我用的是当前时间(2022-04-14)最新版本 报错内容 Description:The de ...
- SpringBoot使用PageHelper报错Relying upon circular references is discouraged and they are prohibited by
SpringBoot使用PageHelper报错Relying upon circular references is discouraged and they are prohibited by d ...
- 使用RENREN-GENERATOR时遇到循环错误问题 Relying upon circular references is discouraged and they are prohibited
这是由于所使用的SPRING-BOOT版本较高缘故,若SPRING-BOOT版本大于2.6.x,就会出现该错误,此时只需要在application.yml文件作出如下改变: server:port: ...
- springboot2.6版本因循环引用导致启动时报错的问题Relying upon circular references is discouraged and they are prohibite
报错信息: Description:The dependencies of some of the beans in the application context form a cycle:┌──- ...
- because it is included into a circular dependency循环依赖的解决办法
一般是Artifacts里面有多个相同的war,war exploded,删掉多余的,留下一个即可 注意:删除多余war,war exploded的时候这里可能爆红 爆出如下异常 Artifact ...
- pagehelper circular references
Description: The dependencies of some of the beans in the application context form a cycle: ┌──-> ...
- Spring 循环依赖(circular dependency)
一.什么是循环依赖 循环依赖即循环引用,形成闭环.比如,A 依赖 B,B 又依赖 A,形成了循环依赖:或者 A 依赖 B,B 依赖 C,C 又依赖 A,形成了循环依赖:更或者是自己依赖自己.如图: 这 ...
最新文章
- android arm
- python参数化_Python 中如何实现参数化测试的方法示例
- java学习(63):普通内部类
- Android的xml/assets/raw资源使用具体解释
- java根据模板生成word文档_Python办公自动化:使用python来自动生成word文档
- CTF之Web安全训练前篇1
- verilog 简单module_HDLBits:在线学习 Verilog (二十九 · Problem 140-144)
- Django入门10--admin增强
- c#textBox控件限制只允许输入数字及小数点
- 征服ASP.NET Ajax典型应用 (试读)
- vc2015静态编译方法
- 20182319彭淼迪 2019-2020-1 《数据结构与面向对象程序设计》实验一报告
- HTML kind属性怎么用?
- allegro更新铜皮方法和快捷键
- python 实现复数计算器
- QQ空间说说刷赞网页版开放公测
- yigo基础学习笔记4_业务流程
- 【SSM电商项目后台开发】001-数据库建表
- 读书笔记 | 4.1 信用报告及其国际比较
- 2019-10-28 超大文本打开工具PilotEdit
热门文章
- MATLAB的DV-Hop算法的实现
- 我的创作纪念日---Look back on the past year of hard work
- 使用fiddler修改IP访问
- 计算机桌面程序explorer,桌面程序explorer开机不启动怎么办_开机黑屏运行explorer没用怎么修复-系统城...
- VS2019打包C#桌面程序
- 如何从上位机或者触摸屏设定Time或S5Time值?
- mongodb--复制集和故障诊断(笔记)
- 与大多数台式机和移动广告软件说再见
- 心态-《九型人格:自我发现与提升手册》书中的精髓:帮助人们做到真正的知己知彼,从而突破个人限制,不断发展自我、提升自我。
- 量子隐形传态过程的推导(Quantum teleportation)