Skip to content

Issue with shortcut configuration not working for SetRequestUriGatewayFilterFactory #4062

@q975144677

Description

@q975144677

Describe the bug
When configuring SetRequestUri to modify the target URI, the shortcut configuration mode is ineffective. Only the name+args configuration format works. The possible cause is that the parameter name in the shortcutFieldOrder() method is incorrect. The method returns Arrays.asList("name"), which does not match the actual property name template in the configuration class.

Sample
A NullPointerException occurs because the template field value cannot be found when using the shortcut configuration:
- SetRequestUri=http://127.0.0.1:8081
The configuration works normally when using the name+args format:
- name: SetRequestUri args: template: http://127.0.0.1:8081

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions