Skip to content

Commit

Permalink
Fixes spring-cloudgh-2933 GatewayFilter support @order annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
wangYX657211334 committed Apr 21, 2023
1 parent 1d6690c commit 0dcb554
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.springframework.cloud.gateway.filter.OrderedGatewayFilter;
import org.springframework.cloud.gateway.filter.factory.GatewayFilterFactory;
import org.springframework.cloud.gateway.route.Route;
import org.springframework.core.DecoratingProxy;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import org.springframework.web.server.ServerWebExchange;
Expand All @@ -43,6 +44,7 @@
*
* @author Rossen Stoyanchev
* @author Spencer Gibb
* @author Yuxin Wang
* @since 0.1
*/
public class FilteringWebHandler implements WebHandler {
Expand Down Expand Up @@ -124,7 +126,7 @@ public Mono<Void> filter(ServerWebExchange exchange) {

}

private static class GatewayFilterAdapter implements GatewayFilter {
private static class GatewayFilterAdapter implements GatewayFilter, DecoratingProxy {

private final GlobalFilter delegate;

Expand All @@ -145,6 +147,11 @@ public String toString() {
return sb.toString();
}

@Override
public Class<?> getDecoratedClass() {
return delegate.getClass();
}

}

}

0 comments on commit 0dcb554

Please sign in to comment.