docs: document naming convention and YAML usage for custom route predicates#4204
Open
won-seoop wants to merge 1 commit into
Open
docs: document naming convention and YAML usage for custom route predicates#4204won-seoop wants to merge 1 commit into
won-seoop wants to merge 1 commit into
Conversation
…icates (spring-cloudGH-3463) The Developer Guide showed how to write a custom RoutePredicateFactory and how to reference custom GatewayFilters in configuration, but had no equivalent guidance for predicates. Added a "Naming Custom Predicates And References In Configuration" section right after the custom predicate class example, covering: - The RoutePredicateFactory suffix naming convention - Shortcut and fully-expanded YAML configuration examples - A WARNING about unsupported non-standard naming Closes spring-cloudgh-3463 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ryanjbaxter
reviewed
Jun 15, 2026
|
|
||
| The predicate factory must override `shortcutFieldOrder()` to define the order of shortcut arguments and `Config` fields must match the keys used in the `args` map. | ||
|
|
||
| WARNING: It is possible to create a predicate named without the `RoutePredicateFactory` suffix. |
Contributor
There was a problem hiding this comment.
I would not even mention this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3463
The Developer Guide explained how to write a custom
RoutePredicateFactoryand how to reference customGatewayFilters in YAML configuration, but there was no equivalent guidance for custom predicates. Users were left guessing whether the same naming convention applied.Added a
[[naming-custom-predicates-and-references-in-configuration]]subsection immediately after the custom predicate class example that mirrors the existing filter naming section:RoutePredicateFactorysuffix naming convention (stripsRoutePredicateFactory→ predicate name used in config)- My=argument) and fully-expanded (name: My,args: ...) YAML formsshortcutFieldOrder()must be overridden for the shortcut form to workWARNINGabout non-standard names (no suffix), consistent with the existing filter warningTest plan