From 86a55ee66982319cc9e0d5082cebdee4ec4931d5 Mon Sep 17 00:00:00 2001
From: zhouhn <zhouhn@xiaopeng.com>
Date: 星期六, 07 三月 2026 20:59:57 +0800
Subject: [PATCH] 解决启动循环依赖报错
---
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/WebMvcConfigurer.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/WebMvcConfigurer.java b/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/WebMvcConfigurer.java
index 60d09e6..2c179cc 100644
--- a/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/WebMvcConfigurer.java
+++ b/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/config/WebMvcConfigurer.java
@@ -3,24 +3,23 @@
import com.xiaopeng.unifiedverification.interceptor.CheckForClientInterceptor;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-import javax.annotation.Resource;
@Slf4j
@Configuration
-public class WebMvcConfigurer extends WebMvcConfigurerAdapter {
+public class WebMvcConfigurer implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer {
- @Resource
+ @Autowired
+ @Lazy
private CheckForClientInterceptor checkForClientInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 统一验证服务拦截器
registry.addInterceptor(checkForClientInterceptor).addPathPatterns("/vehicle/v1/**");
- super.addInterceptors(registry);
}
}
--
Gitblit v1.7.1