The dependencies of some of the beans in the application context form a cycle:
viewResolver defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]
↓
com.mitchellbosecke.pebble.boot.autoconfigure.PebbleAutoConfiguration$PebbleWebMvcConfiguration (field private com.mitchellbosecke.pebble.PebbleEngine com.mitchellbosecke.pebble.boot.autoconfigure.PebbleAutoConfiguration$PebbleWebMvcConfiguration.pebbleEngine)
┌─────┐
| com.mitchellbosecke.pebble.boot.autoconfigure.PebbleAutoConfiguration$PebbleDefaultConfiguration (field private java.util.List com.mitchellbosecke.pebble.boot.autoconfigure.PebbleAutoConfiguration$PebbleDefaultConfiguration.extensions)
└─────┘
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.
Loading...
一开始我用idea新建了一个项目,2.7.8版本,然后其他依赖使用的和廖大的一样。启动直接报错,说什么bean的依赖关系形成了一个循环
怀疑是pebbetemplate版本和springboot版本不搭的问题,然后把springboot换成和廖大一样的版本2.3.0可以正常返回页面。以后这种报错全靠百度了,定位都定位不出来,不知道改哪里,,,