Variable resolution
Micronaut tries to populate method arguments in the following order:
URI variables like
/{id}
.From query parameters if the request is a
GET
request (e.g.?foo=bar
).If there is a
@Body
and request allows the body, bind the body to it.If the request can have a body and no
@Body
is defined then try to parse the body (either JSON or form data) and bind the method arguments from the body.Finally, if the method arguments cannot be populated return
400 BAD REQUEST
.