@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented @Inherited public @interface WxApiParam
| Modifier and Type | Optional Element and Description |
|---|---|
String |
defaultValue
The default value to use as a fallback when the request parameter is
not provided or has an empty value.
|
String |
name
The value of the request parameter to bind to.
|
boolean |
required
Whether the parameter is required.
|
String |
value
Alias for
name(). |
@AliasFor(value="value") public abstract String name
public abstract boolean required
Defaults to true, leading to an exception being thrown
if the parameter is missing in the request. Switch this to
false if you prefer a null value if the parameter is
not present in the request.
Alternatively, provide a defaultValue(), which implicitly
sets this flag to false.
public abstract String defaultValue
Supplying a default value implicitly sets required() to
false.
Copyright © 2018 Guangshan Technology, Inc.. All rights reserved.