@Target(value=PARAMETER)
@Retention(value=RUNTIME)
@Documented
public @interface Header
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
defaultValue
The default value to use as a fallback.
|
boolean |
required
Whether the header is required.
|
java.lang.String |
value
The name of the request header to bind to.
|
public abstract java.lang.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 java.lang.String defaultValue
required()
to false
.