@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface Header
| Modifier and Type | Optional Element and Description |
|---|---|
String |
defaultValue
The default value to use as a fallback.
|
boolean |
required
Whether the header is required.
|
String |
value
The name of the request header to bind to.
|
public abstract String value
public abstract boolean required
Default is true, leading to an exception if the header missing. Switch this
to false if you prefer a null in case of the header missing.
public abstract String defaultValue
required() to false.