spring-cloud-gateway
spring-cloud-gateway copied to clipboard
Spring Cloud Gateway MVC: using custom filter in the YAML
For Spring Cloud Gateway MVC (without webFlux), an equivalent of AbstractGatewayFilterFactory (Gateway Reactive Server) is needed, which allows writing a custom filter and using it by specifying it in the YAML manifest, as shown in this StackOverflow question.
Currently, to use a custom filter, I am forced to write a @Bean RouterFunction in Java.
Refer to the filter in Gateway Reactive Server here: Spring Cloud Gateway - Writing Custom GatewayFilter Factories.