Closed
Description
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:
- Document default EmbeddedValueResolver support for property placeholders [SPR-17212] #21745 Document default EmbeddedValueResolver support for property placeholders
- Support SpEL next to placeholders in annotation attributes (e.g. @Scheduled) [SPR-13625] #18203 Support SpEL next to placeholders in annotation attributes (e.g.
@Scheduled
) - @RequestHeader name/value does not accept placeholders [SPR-13952] #18525
@RequestHeader
name/value does not accept placeholders - automatic registration of PSPC when @PropertySource is used [SPR-8539] #13183 automatic registration of PSPC when
@PropertySource
is used - @Enable-style annotation is desired for automatic registration of PropertySourcesPlaceholderConfigurer [SPR-9904] #14537
@Enable-style
annotation is desired for automatic registration of PropertySourcesPlaceholderConfigurer
Referenced from: commits 0f0aa46, cb95496
0 votes, 5 watchers