Supports Spring MVC 5.3.X.
Please refer to the list of all features. To check the feature support for this converter. You will find a list of spring specific features that are supported below.
-
Supports RequestMapping annotation
- Example:
@RequestMapping("/todos")
- Example:
-
Supports all HTTP method based mapping annotations (DeleteMapping, GetMapping, PatchMapping, PostMapping, PutMapping)
- Example:
@GetMapping("/todos")
- Example:
-
Supports endpoint definition on class level, method level and a combination of both.
-
Supports multiple path definitions on all HTTP method based mapping annotations
- Example:
@GetMapping(value = ["/todos", "todo/list"])
- Example:
-
Supports multiple path definitions on RequestMapping annotation
- Example:
@RequestMapping(value = ["/todos", "todo/list"], method = [RequestMethod.POST, RequestMethod.GET])
- Example:
-
Supports endpoints using regex for path parameter
- Example:
@RequestMapping("/{id:[0-9]+}")
- Example:
-
Supports RequestMapping annotation
- Example:
@RequestMapping(method = GET)
- Example:
-
Supports all HTTP method based mapping annotations (DeleteMapping, GetMapping, PatchMapping, PostMapping, PutMapping)
- Example:
@GetMapping("/todos")
- Example:
-
Supports parameter name using variable name
- Example:
@RequestParam tag: String
- Example:
-
Supports parameter name defined by 'value'
- Example:
@RequestParam(value = "tag") otherName: String
- Example:
-
Supports parameter name defined by alias 'name'
- Example:
@RequestParam(name = "tag") otherName: String
- Example:
-
Throws an exception in case both 'value' and 'name' are set.
- Example:
@RequestParam(value = "param", name = "other") foo: String
- Example:
-
Checks if a parameter is required depending on the value of the 'required' attribute
- Example:
@RequestParam(required = false) foo: String
- Example:
-
Checks if a parameter is required depending on the existence of the 'defaultValue' attribute
- Example:
@RequestParam(value = "tag", defaultValue = "all")
- Example:
-
Supports parameter name using variable name
- Example:
@PathVariable id: Int
- Example:
-
Supports parameter name defined by 'value'
- Example:
@PathVariable(value = "id") otherName: Int
- Example:
-
Supports parameter name defined by alias 'name'
- Example:
@PathVariable(name = "id") otherName: Int
- Example:
-
Throws an exception in case both 'value' and 'name' are set.
- Example:
@PathVariable(value = "param", name = "other") foo: Int
- Example:
-
Supports parameter name using variable name
- Example:
@RequestHeader allowCache: String
- Example:
-
Supports parameter name defined by 'value'
- Example:
@RequestParam(value = "allow-cache") otherName: String
- Example:
-
Supports parameter name defined by alias 'name'
- Example:
@RequestHeader(name = "allow-cache") otherName: String
- Example:
-
Throws an exception in case both 'value' and 'name' are set.
- Example:
@RequestHeader(value = "param", name = "other") foo: String
- Example:
-
Checks if a parameter is required depending on the value of the 'required' attribute
- Example:
@RequestHeader(required = false) foo: String
- Example:
-
Checks if a parameter is required depending on the existence of the 'defaultValue' attribute
- Example:
@RequestHeader(value = "tracker-id", defaultValue = "2394")
- Example:
-
Supports parameter name using variable name
- Example:
@MatrixVariable tag: String
- Example:
-
Supports parameter name defined by 'value'
- Example:
@MatrixVariable(value = "tag") otherName: String
- Example:
-
Supports parameter name defined by alias 'name'
- Example:
@MatrixVariable(name = "tag") otherName: String
- Example:
-
Throws an exception in case both 'value' and 'name' are set.
- Example:
@MatrixVariable(value = "param", name = "other") foo: String
- Example:
-
Checks if a parameter is required depending on the value of the 'required' attribute
- Example:
@MatrixVariable(required = false) foo: String
- Example:
-
Checks if a parameter is required depending on the existence of the 'defaultValue' attribute
- Example:
@MatrixVariable(value = "tag", defaultValue = "shopping")
- Example:
-
Supports RequestMapping annotation
- Example:
@RequestMapping(produces = "text/plain")
- Example:
-
Supports all HTTP method based mapping annotations (DeleteMapping, GetMapping, PatchMapping, PostMapping, PutMapping)
- Example:
@GetMapping(produces = "text/plain")
- Example:
-
Supports
javax.servlet.http.HttpServletResponse
parameter type- Example:
@GetMapping("/items") fun getItems(response: HttpServletResponse)
- Example:
-
Supports default value in case no produces definition has been set
-
Supports text/plain if the return value is a String and no produces definition has been set
-
Supports RequestMapping annotation
- Example:
@RequestMapping(consumes = "text/plain")
- Example:
-
Supports all HTTP method based mapping annotations (DeleteMapping, GetMapping, PatchMapping, PostMapping, PutMapping)
- Example:
@GetMapping(consumes = "text/plain")
- Example:
-
Supports default value in case no consumes definition has been set
-
Supports
*/*
if the return value is a String and no consumes definition has been set
-
Checking whether or not to explode query parameter.
- Example:
@RequestParam(value="tag", required=false) tags: List<String>
or@RequestParam(value="tag", required=false) tags: Array<String>
- Example:
-
Query Parameter based on an object
- Example:
@GetMapping("/todos") fun getAllTodos(queryParams: MyObject)
- Example:
-
Parameter annotations on a HashMap to dynamically extract parameters
-
Matrix parameters having a binding to a specific path element
- Example:
@MatrixVariable(pathVar = "employee")
- Example:
-
Produces using negated media type
- Example:
@RequestParam(produces = "!text/plain")
- Example:
-
Consumes using negated media type
- Example:
@RequestParam(produces = "!text/plain")
- Example: