-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to register custom predicates and filters for use in Server MVC configuration #3268
Comments
No abstract class is needed. What is, is the documentation on how to register predicates and filters for use in configuration rather than java dsl. |
See spring-cloud-gateway/spring-cloud-gateway-server-mvc/src/main/resources/META-INF/spring.factories Lines 1 to 6 in 67fc537
and spring-cloud-gateway/spring-cloud-gateway-server-mvc/src/main/resources/META-INF/spring.factories Lines 12 to 14 in 67fc537
for now |
Watch #3250 for a programmatic way to register. |
Hi @spencergibb, I'm writing a custom
Something like this?
|
|
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.
The text was updated successfully, but these errors were encountered: