@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface PathVariable
RequestMappingannotated handler methods in Servlet environments.
If the method parameter is
then the map is populated with all path variable names and values.
public abstract boolean required
true, leading to an exception being thrown if the path
variable is missing in the incoming request. Switch this to
you prefer a
null or Java 8
java.util.Optional in this case.
e.g. on a
ModelAttribute method which serves for different requests.