第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > springboot2.6版本因循环引用导致启动时报错的问题Relying upon circular referenc

springboot2.6版本因循环引用导致启动时报错的问题Relying upon circular referenc

时间:2020-10-01 11:10:35

相关推荐

springboot2.6版本因循环引用导致启动时报错的问题Relying upon circular referenc

报错信息:

Description:The dependencies of some of the beans in the application context form a cycle:┌──->──┐| helloController (field private org.springframework.web.client.RestTemplate com.example.jcloudsonsumer.controller.HelloController.restTemplate)└──<-──┘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.

解决办法:

spring:main:#解决spring boot2.6因循环引用导致启动时报错allow-circular-references: true

springboot2.6版本因循环引用导致启动时报错的问题Relying upon circular references is discouraged and they are prohibite

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。