Class RequestHeaderMethodArgumentResolver

java.lang.Object
org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver
org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver
All Implemented Interfaces:
HandlerMethodArgumentResolver

public class RequestHeaderMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver
Resolves method arguments annotated with @RequestHeader except for Map arguments. See RequestHeaderMapMethodArgumentResolver for details on Map arguments annotated with @RequestHeader.

An @RequestHeader is a named value resolved from a request header. It has a required flag and a default value to fall back on when the request header does not exist.

A WebDataBinder is invoked to apply type conversion to resolved request header values that don't yet match the method parameter type.

Since:
3.1
Author:
Arjen Poutsma, Rossen Stoyanchev