|
|
|
@@ -1,7 +1,5 @@ |
|
|
|
package com.bigwinepot.nwdn.network.platform; |
|
|
|
|
|
|
|
import com.sankuai.waimai.router.Router; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
@@ -19,32 +17,16 @@ public class InterceptorRetriever { |
|
|
|
|
|
|
|
public static List<Interceptor> interceptors() { |
|
|
|
List<Interceptor> interceptors = new ArrayList<>(); |
|
|
|
boolean isNeed = false; |
|
|
|
if (isNeed) { |
|
|
|
Interceptor serverInterceptor = Router.getService(Interceptor.class, |
|
|
|
INTERCEPTOR_SERVER); |
|
|
|
if (serverInterceptor != null) { |
|
|
|
interceptors.add(serverInterceptor); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Interceptor crawlerInterceptor = Router.getService(Interceptor.class, INTERCEPTOR_CRAWLER); |
|
|
|
Interceptor crawlerInterceptor = new CrawlerInterceptor(); |
|
|
|
if (crawlerInterceptor != null) { |
|
|
|
interceptors.add(crawlerInterceptor); |
|
|
|
} |
|
|
|
|
|
|
|
Interceptor businessInterceptor = Router.getService(Interceptor.class, |
|
|
|
INTERCEPTOR_BUSINESS); |
|
|
|
Interceptor businessInterceptor = new BusinessInterceptor(); |
|
|
|
if (businessInterceptor != null) { |
|
|
|
interceptors.add(businessInterceptor); |
|
|
|
} |
|
|
|
if (isNeed) { |
|
|
|
Interceptor commonParamsInterceptor = Router.getService(Interceptor.class, |
|
|
|
INTERCEPTOR_MT_COMMON_PARAMS); |
|
|
|
if (commonParamsInterceptor != null) { |
|
|
|
interceptors.add(commonParamsInterceptor); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return interceptors; |
|
|
|
} |
|
|
|
|