The same project running in Spring Boot v2.5.13 runs without any errors, but when upgrading to Spring Boot v2.6.0 or above it fails with error message:

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

How to reproduce: Check working code from https://github.com/fteran/spring-security-oauth-demo.git Update pom.xml line 8 to <version>2.6.0</version> Run project by executing command: .\mvnw spring-boot:run

Comment From: sbrannen

Closing as a duplicate of https://github.com/spring-projects/spring-boot/issues/30854 in the Spring Boot issue tracker.