Java Code Examples for org.springframework.web.bind.annotation.PathVariable#required()
The following examples show how to use
org.springframework.web.bind.annotation.PathVariable#required() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PathParametersSnippet.java From spring-auto-restdocs with Apache License 2.0 | 5 votes |
@Override protected boolean isRequired(MethodParameter param, PathVariable annot) { // Spring disallows null for primitive types. // For types wrapped in Optional or nullable Kotlin types, the required flag in // the annotation is ignored by Spring. return param.getParameterType().isPrimitive() || (!param.isOptional() && annot.required()); }
Example 2
Source File: PathVariableMethodArgumentResolver.java From spring-analysis-note with MIT License | 4 votes |
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); }
Example 3
Source File: PathVariableMethodArgumentResolver.java From spring-analysis-note with MIT License | 4 votes |
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); }
Example 4
Source File: PathVariableMethodArgumentResolver.java From java-technology-stack with MIT License | 4 votes |
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); }
Example 5
Source File: PathVariableMethodArgumentResolver.java From java-technology-stack with MIT License | 4 votes |
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); }
Example 6
Source File: PathVariableMethodArgumentResolver.java From lams with GNU General Public License v2.0 | 4 votes |
public PathVariableNamedValueInfo(PathVariable annotation) { super(annotation.name(), annotation.required(), ValueConstants.DEFAULT_NONE); }