admin管理员组文章数量:1205733
I am migrating from spring mvc to spring boot 2.7.1 with oauth 2.0. After doing all the necessary changes I get a circular reference issue when the application is getting started.
error details:
***************************
APPLICATION FAILED TO START
***************************
Description:
The dependencies of some of the beans in the application context form a cycle:
OAuth2AuthorizationServerConfig (field private org.springframework.security.authentication.AuthenticationManager com.OAuth2AuthorizationServerConfig.authenticationManager)
┌─────┐
| webSecurityConfig
↑ ↓
| org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration
↑ ↓
| org.springframework.security.config.annotation.web.configuration.OAuth2ClientConfiguration$OAuth2ClientWebMvcSecurityConfiguration
↑ ↓
| authorizedClientRepository defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/servlet/OAuth2WebSecurityConfiguration.class]
└─────┘
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.`
Using @lazy annotation at AuthenticationManager
trying to exclude autoconfig in spring boot for oauth alone using exclusions
本文标签: Spring MVC to Spring Boot 271 MigrationStack Overflow
版权声明:本文标题:Spring MVC to Spring Boot 2.7.1 Migration - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738693513a2107240.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论