报错:
The dependencies of some of the beans in the application context form a cycle:
tokenController (field private com.ruoyi.auth.service.SysLoginService com.ruoyi.auth.controller.TokenController.sysLoginService)
↓
sysLoginService (field private com.ruoyi.system.api.RemoteLogService com.ruoyi.auth.service.SysLoginService.remoteLogService)
↓
org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration
┌─────┐
| com.alibaba.cloud.sentinel.SentinelWebAutoConfiguration (field private java.util.Optional com.alibaba.cloud.sentinel.SentinelWebAutoConfiguration.sentinelWebInterceptorOptional)
是循环依赖的问题
因为spring 2/6/X会爆出循环依赖的问题,所以需要再spring下面添加一下代码允许循环依赖。
在对应爆出循环依赖的文件下的bootstrap.yml中
main:
allow-circular-references: true