|
|
@@ -9,6 +9,8 @@ import com.fasterxml.jackson.databind.JsonNode;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -35,7 +37,10 @@ public class IndicatorMappingService {
|
|
|
@Resource
|
|
|
private IndicatorDefinitionMapper definitionMapper;
|
|
|
|
|
|
- @Resource
|
|
|
+ // 循环依赖破环:AiGateway→BasicQuotaService→MembershipService→…→HealthReportService→本类。
|
|
|
+ // @Lazy 仅对 @Autowired 生效(非 @Resource);AI 兜底按需触发,懒加载可安全打破 Spring Boot 2.7 默认的循环引用禁令。
|
|
|
+ @Lazy
|
|
|
+ @Autowired
|
|
|
private AiGateway aiGateway;
|
|
|
|
|
|
@Resource
|