Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, we can use a method parameter by implying it via an annotation. By using annotations, we can provide additional information about a method parameter such as its data type, its required status, its default value, its valid range or its constraints. This information can be useful for validation, documentation or runtime processing of the method parameter. Some examples of annotations that can be used for method parameters are @PathParam, @QueryParam, @RequestBody, @RequestParam, @JsonIgnoreProperties, etc.