Skip to content

@RequestHeader name/value does not accept placeholders [SPR-13952] #18525

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

Closed
spring-projects-issues opened this issue Feb 17, 2016 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Feb 17, 2016

Bjorn Harvold opened SPR-13952 and commented

I would like to be able to control the name of my auth token per environment. Ergo, I would like to be able to do something like this:

@RequestHeader(value = "${env.auth.token}", required = true)

Currently, this only works with a constant string.


Affects: 4.2.4

Issue Links:

Referenced from: commits e0d7c6b

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

As of 4.3, we resolve all such name attributes (which are mirrored as value) on handler method arguments, the same way that we process defaultValue already. This means that placeholders as well expressions are getting evaluated now.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants