spring-projects / spring-projects/spring-framework

Support @RequestParam, @RequestHeader, etc. as meta-annotations [SPR-17296]

Open
#21,829 6 comments 21 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: web type: enhancement
Dominant language
Java
Stars
60.2k
Forks
38.8k
Avg merge
5d 2h
Merged PRs (30d)
27

Description

Rob Winch opened SPR-17296 and commented

It would be nice if @RequestHeader could be used for a meta-annotation. This would make it easier if a header was being used consistently throughout the entire application. For example, a user might do something like this:

@Retention(RetentionPolicy.RUNTIME)
@RequestHeader(name = "user-id")
public @interface CurrentUserId {
}

No further details from SPR-17296

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names @RequestParam, @RequestHeader, and a CurrentUserId meta-annotation example, but no files, tests, or entry point. Start by locating the request-annotation resolution code and existing annotation tests; done means the example works for the listed request annotations with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.