Package io.micronaut.http.annotation
Annotation Interface RouteCondition
Allows defining a condition for this route to match using an expression.
Within the scope of the expression a request
variable is available that references the HttpRequest
.
When added to a method the condition will be evaluated during route matching and if the condition
does not evaluate to true
the route will not be matched resulting in a HttpStatus.NOT_FOUND
response.
Note that this annotation only applies to the server and is ignored when placed on declarative HTTP client routes.
- Since:
- 4.0.0
- See Also:
-
Required Element Summary
-
Element Details
-
value
String valueAn expression that evaluates totrue
orfalse
.- Returns:
- The expression
- Since:
- 4.0.0
-