Skip to content

Placeholder resolution for annotation attributes is not active by default [SPR-14140] #18712

Closed
@spring-projects-issues

Description

@spring-projects-issues

Bjorn Harvold opened SPR-14140 and commented

I created ticket #18525 pre v4.3.RC1.

I updated to 4.3.RC1 today and found that the placeholder still doesn't convert.

The below code fails:

public void logoutUser(@RequestHeader(name = "${auth.token.name}", required = true) String authToken) {
        if (log.isDebugEnabled()) {
            log.debug(String.format("Auth-Token: %s", authToken));
        }
        preAuthenticatedTokenCacheService.deleteExistingSessions(Collections.singletonList(authToken));
	}
2016-04-09 11:13:29,346 E DefaultExceptionHandler - Http Status: 400 : Missing request header '${auth.token.name}' for method parameter of type String
org.springframework.web.bind.ServletRequestBindingException: Missing request header '${auth.token.name}' for method parameter of type String

Please advise


Affects: 4.3 RC1

Issue Links:

Referenced from: commits 0f0aa46, cb95496

0 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions