From 2bde477f7fcb51750363a118ef6c2ee35d9fcbd1 Mon Sep 17 00:00:00 2001 From: yukdawn Date: Thu, 7 Apr 2022 23:19:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../retrofit/spring/boot/core/RetrofitFactoryBean.java | 1 + .../lianjiatech/retrofit/spring/boot/test/http/HttpApi4.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/lianjiatech/retrofit/spring/boot/core/RetrofitFactoryBean.java b/src/main/java/com/github/lianjiatech/retrofit/spring/boot/core/RetrofitFactoryBean.java index 5aa0140..3f995bf 100644 --- a/src/main/java/com/github/lianjiatech/retrofit/spring/boot/core/RetrofitFactoryBean.java +++ b/src/main/java/com/github/lianjiatech/retrofit/spring/boot/core/RetrofitFactoryBean.java @@ -300,6 +300,7 @@ private synchronized OkHttpClient getOkHttpClient(Class retrofitClientInterfa } // add DegradeInterceptor + // TODO 这里稍微有点问题,开启熔断则所有实例都会加熔断拦截器,但是拦截器升不生效则取决于是否配置了@Degrade注解,可不可以把这里做成有一个全局默认配置,有@Degrade则走单独配置? DegradeProperty degradeProperty = retrofitProperties.getDegrade(); if (degradeProperty.isEnable()) { DegradeType degradeType = degradeProperty.getDegradeType(); diff --git a/src/test/java/com/github/lianjiatech/retrofit/spring/boot/test/http/HttpApi4.java b/src/test/java/com/github/lianjiatech/retrofit/spring/boot/test/http/HttpApi4.java index 3c98b72..b9f5d47 100644 --- a/src/test/java/com/github/lianjiatech/retrofit/spring/boot/test/http/HttpApi4.java +++ b/src/test/java/com/github/lianjiatech/retrofit/spring/boot/test/http/HttpApi4.java @@ -24,7 +24,7 @@ public interface HttpApi4 { * @param id . * @return . */ - @GET("person") + @GET("/degrade/person") Result getPerson(@Query("id") Long id); @Service