@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface PathVariable
RequestMapping annotated handler methods in Servlet
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.