Skip to content

[BUG] Spring SDK parameter processors ignore Spring annotation name aliases #7465

Closed

Description

@Aias00

Description

The Spring SDK parameter processors read only annotation.value() for Spring MVC annotations. Spring treats value and name as aliases on @RequestParam, @RequestHeader, @PathVariable, and @CookieValue, but the SDK ignores name().

Location

  • RequestParamParameterProcessor.java:48
  • RequestHeaderParameterProcessor.java:49
  • PathVariableParameterProcessor.java:45
  • CookieValueParameterProcessor.java:52

Impact

Valid client declarations such as @RequestParam(name = "id") or @RequestHeader(name = "X-Auth") fail the SDK processor's non-empty checks or omit the intended data. These annotations are common in Spring code and should behave the same way in the SDK proxy.

Suggested fix

Resolve the effective annotation name from value() or name() for each processor. Add tests for name-only and value-only declarations.

Related existing issues

No duplicate found in the supplied issue and PR snapshots.

Reviewed Revision And Validation

Apache ShenYu 2.7.2-SNAPSHOT, master at a89b6a2. Severity: medium. Confidence: high.

Current Spring SDK annotation processor harness tested name-only annotations; source caller uses parameter annotations.

Current source references:

  • shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/annotation/RequestParamParameterProcessor.java:48
  • shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/annotation/RequestHeaderParameterProcessor.java:49
  • shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/annotation/PathVariableParameterProcessor.java:45
  • shenyu-sdk/shenyu-sdk-spring/src/main/java/org/apache/shenyu/sdk/spring/annotation/CookieValueParameterProcessor.java:52

No implementation fix or full deployed end-to-end validation was performed by this review. Source-flow and runtime evidence are distinguished above.

Activity

  1. github-actions commented on Oct 7, 2026

    @github-actions
    Contributor

    👋 Hello @Aias00

    A new issue has been opened by @Aias00:

    Please review when you have time. Thank you! 🙏

  2. added a commit that references this issue on Oct 11, 2026
    15f926d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions