fix: 打印调用oamda api日志
This commit is contained in:
@@ -32,6 +32,11 @@
|
|||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import feign.RequestInterceptor;
|
import feign.RequestInterceptor;
|
||||||
import feign.RequestTemplate;
|
import feign.RequestTemplate;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.ParameterizedTypeReference;
|
import org.springframework.core.ParameterizedTypeReference;
|
||||||
@@ -26,6 +27,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
* @author: caiyuchao
|
* @author: caiyuchao
|
||||||
* @date: 2024-11-21
|
* @date: 2024-11-21
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Configuration
|
@Configuration
|
||||||
public class FeignConfig implements RequestInterceptor {
|
public class FeignConfig implements RequestInterceptor {
|
||||||
|
|
||||||
@@ -83,6 +85,9 @@ public class FeignConfig implements RequestInterceptor {
|
|||||||
requestTemplate.uri("/openapi/v1/" + omadaProperties.getOmadacId() + lastUri);
|
requestTemplate.uri("/openapi/v1/" + omadaProperties.getOmadacId() + lastUri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info("requestTemplate path:{}", requestTemplate.path());
|
||||||
|
log.info("omadacId:{}", omadaProperties.getOmadacId());
|
||||||
|
log.info("authorization:{}", authorization);
|
||||||
// 添加授权请求头
|
// 添加授权请求头
|
||||||
requestTemplate.header(AUTHORIZATION, authorization);
|
requestTemplate.header(AUTHORIZATION, authorization);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user