Browse Source

修改@RetrofitClient中的directReturn配置,默认值改为true,默认接口直接返回数据对象

Signed-off-by: luoshi <luoshi@qmth.com.cn>
luoshi 3 years ago
parent
commit
1c2d1d603f

+ 3 - 3
core-retrofit/src/main/java/com/qmth/boot/core/retrofit/annotatioin/RetrofitClient.java

@@ -27,14 +27,14 @@ public @interface RetrofitClient {
     LogLevel logLevel() default LogLevel.OFF;
 
     /**
-     * 是否直接返回数据对象而不使用Call包装,默认为false
+     * 是否直接返回数据对象而不使用Call包装,默认为true
      *
      * @return
      */
-    boolean directReturn() default false;
+    boolean directReturn() default true;
 
     /**
-     * 自定义客户端配置
+     * 自定义客户端配置类,使用时会尝试从SpringContext中按Class获取
      *
      * @return
      */

+ 1 - 1
core-solar/src/main/java/com/qmth/boot/core/solar/api/SolarApiClient.java

@@ -9,7 +9,7 @@ import retrofit2.http.Query;
 
 import java.util.List;
 
-@RetrofitClient(directReturn = true, configuration = SolarApiConfiguration.class)
+@RetrofitClient(configuration = SolarApiConfiguration.class)
 public interface SolarApiClient {
 
     @POST("app/info")