|
|
@@ -1,16 +1,12 @@
|
|
|
package com.kxs.system.api.feign.config;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
-import com.kxs.common.core.constant.SecurityConstants;
|
|
|
-import com.kxs.common.core.constant.ServiceNameConstants;
|
|
|
-import com.kxs.common.core.util.WebUtils;
|
|
|
import com.kxs.system.api.feign.*;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
-import org.springframework.web.context.request.RequestAttributes;
|
|
|
import org.springframework.web.context.request.RequestContextHolder;
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
import org.springframework.web.reactive.function.client.ClientRequest;
|
|
|
@@ -18,8 +14,6 @@ import org.springframework.web.reactive.function.client.WebClient;
|
|
|
import org.springframework.web.reactive.function.client.support.WebClientAdapter;
|
|
|
import org.springframework.web.service.invoker.HttpServiceProxyFactory;
|
|
|
|
|
|
-import java.util.Optional;
|
|
|
-
|
|
|
/**
|
|
|
* <p>
|
|
|
* 当前服务的webClient配置 服务下的远程调用统一在此配置
|
|
|
@@ -32,6 +26,8 @@ import java.util.Optional;
|
|
|
@RequiredArgsConstructor
|
|
|
public class AdminFeignClientConfiguration {
|
|
|
|
|
|
+ private static final String ADMIN_SERVICE = "http://localhost:8080";
|
|
|
+
|
|
|
@Bean
|
|
|
public WebClient oauthRequestInterceptor() {
|
|
|
|
|
|
@@ -53,7 +49,7 @@ public class AdminFeignClientConfiguration {
|
|
|
}
|
|
|
return next.exchange(filtered.build());
|
|
|
})
|
|
|
- .baseUrl(ServiceNameConstants.ADMIN_SERVICE)
|
|
|
+ .baseUrl(ADMIN_SERVICE)
|
|
|
.build();
|
|
|
}
|
|
|
|