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展示
- bug解决
bug展示
为了解决CVE-2022-22965,将springboot升级到2.6.6,启动项目时出现这样的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解决
问题: 因为业务原因,将springboot升级到2.6.4,启动项目出现这样的bug Error starting ApplicationContext. To display the condit ...
- 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,形成了循环依赖:更或者是自己依赖自己.如图: 这 ...
最新文章
- c语言字符串数组分配没错,【字符串数组面试题】面试问题:C语言基础小结… - 看准网...
- 百度前端技术学院html任务,重回百度前端技术学院第一天 HTML复习
- 混编ObjectiveC++
- attempt to create delete event with null entity
- LiveVideoStack线上分享第五季(十一):Open WebRTC Toolkit实时视频分析系统
- Linux驱动开发中与设备树相关的6种debug方法
- 网页登陆注册(jsp实现)验证码
- 关于IT测试中的一些问题。
- 段错误 php,如何解决php扩展出现段错误的问题
- 精选CSDN的ACM-ICPC专栏
- 封装数据库增删该通用方法
- 2022互联网年终奖大赏!你们年终奖发了多少?
- Android本地音乐播放器
- 实战中,利用10日均线捕捉主升浪,必须满足这四个条件!
- 脖子黑色素沉淀怎么去除,有效方法
- 使用AI提取文字路径
- 去水印软件哪个好_去水印工具
- 巧用win7搜索功能
- 微信公众号最佳实践 ( 9.1)会员卡
- 2018 WAIC |最强阵容!各界大咖齐聚,推动视觉智能全领域发展