diff --git a/neutrino-core/src/main/java/fun/asgc/neutrino/core/aop/interceptor/InterceptorFactory.java b/neutrino-core/src/main/java/fun/asgc/neutrino/core/aop/interceptor/InterceptorFactory.java index 39165d8f..7c1b3caa 100644 --- a/neutrino-core/src/main/java/fun/asgc/neutrino/core/aop/interceptor/InterceptorFactory.java +++ b/neutrino-core/src/main/java/fun/asgc/neutrino/core/aop/interceptor/InterceptorFactory.java @@ -190,22 +190,6 @@ public class InterceptorFactory { if (null == interceptors || null == intercept) { return; } - if (ArrayUtil.notEmpty(intercept.value())) { - for (Class clazz : intercept.value()) { - Interceptor interceptor = get(clazz); - if (null != interceptor && !interceptors.contains(interceptor)) { - interceptors.add(interceptor); - } - } - } - if (ArrayUtil.notEmpty(intercept.exclude())) { - for (Class clazz : intercept.exclude()) { - Interceptor interceptor = get(clazz); - if (null != interceptor && interceptors.contains(interceptor)) { - interceptors.remove(interceptor); - } - } - } if (ArrayUtil.notEmpty(intercept.filter()) || ArrayUtil.notEmpty(intercept.resultAdvice()) || ArrayUtil.notEmpty(intercept.exceptionHandler())) { InterceptorWrapper wrapper = new InterceptorWrapper(); List filterList = getFilterList(intercept.filter()); @@ -222,6 +206,22 @@ public class InterceptorFactory { } interceptors.add(wrapper); } + if (ArrayUtil.notEmpty(intercept.value())) { + for (Class clazz : intercept.value()) { + Interceptor interceptor = get(clazz); + if (null != interceptor && !interceptors.contains(interceptor)) { + interceptors.add(interceptor); + } + } + } + if (ArrayUtil.notEmpty(intercept.exclude())) { + for (Class clazz : intercept.exclude()) { + Interceptor interceptor = get(clazz); + if (null != interceptor && interceptors.contains(interceptor)) { + interceptors.remove(interceptor); + } + } + } if (intercept.ignoreGlobal()) { interceptors.removeAll(globalInterceptorList); }