diff --git a/router/src/main/java/com/chenenyu/router/chain/AppInterceptorsHandler.java b/router/src/main/java/com/chenenyu/router/chain/AppInterceptorsHandler.java index 330f7ef..82bb171 100644 --- a/router/src/main/java/com/chenenyu/router/chain/AppInterceptorsHandler.java +++ b/router/src/main/java/com/chenenyu/router/chain/AppInterceptorsHandler.java @@ -36,7 +36,8 @@ public RouteResponse intercept(Chain chain) { // insert global interceptors in front of the queue if (!Router.getGlobalInterceptors().isEmpty()) { - realChain.getInterceptors().addAll(index++, Router.getGlobalInterceptors()); + realChain.getInterceptors().addAll(index, Router.getGlobalInterceptors()); + index = Router.getGlobalInterceptors().size(); } Set finalInterceptors = new LinkedHashSet<>();