Java Code Examples for org.springframework.web.bind.annotation.RequestBody#required()

The following examples show how to use org.springframework.web.bind.annotation.RequestBody#required() . These examples are extracted from open source projects. 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
protected boolean checkRequired(MethodParameter parameter) {
	RequestBody requestBody = parameter.getParameterAnnotation(RequestBody.class);
	return (requestBody != null && requestBody.required() && !parameter.isOptional());
}
 
Example 2
@Override
public boolean test(MethodParameter parameter) {
	RequestBody annotation = parameter.getParameterAnnotation(RequestBody.class);
	return annotation != null && annotation.required() == this.required;
}
 
Example 3
protected boolean checkRequired(MethodParameter parameter) {
	RequestBody requestBody = parameter.getParameterAnnotation(RequestBody.class);
	return (requestBody != null && requestBody.required() && !parameter.isOptional());
}
 
Example 4
@Override
public boolean test(MethodParameter parameter) {
	RequestBody annotation = parameter.getParameterAnnotation(RequestBody.class);
	return annotation != null && annotation.required() == this.required;
}