Package io.micronaut.web.router
Interface ResourceRoute
- All Superinterfaces:
Route
A resource route is a composite route to a REST endpoint.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface io.micronaut.web.router.Route
DEFAULT_PRODUCES -
Method Summary
Modifier and TypeMethodDescriptionAccept the given media type.exclude(HttpMethod... methods) Exclude a particular HTTP method from this resource route.Nest more routes within thisResourceRoute.Applies the given accepted media type the route.readOnly(boolean readOnly) Whether the route is read-only.where(Predicate<HttpRequest<?>> condition) Match thisRouteonly if the given predicate is true.Methods inherited from interface io.micronaut.web.router.Route
body, body, consumesAll, getConsumes, getProduces, toRouteInfo
-
Method Details
-
consumes
Accept the given media type. -
nest
Nest more routes within thisResourceRoute. -
readOnly
Whether the route is read-only.- Parameters:
readOnly- True if this resource route should be read-only- Returns:
- A new
ResourceRoute
-
exclude
Exclude a particular HTTP method from this resource route.- Parameters:
methods- The methods to exclude- Returns:
- The resource route
-
where
Description copied from interface:RouteMatch thisRouteonly if the given predicate is true.- Specified by:
wherein interfaceRoute- Parameters:
condition- The condition which accepts aHttpRequest- Returns:
- This route
-
produces
Description copied from interface:RouteApplies the given accepted media type the route.
-