Package io.micronaut.web.router
Interface ResourceRoute
- All Superinterfaces:
Route
A resource route is a composite route to a REST endpoint.
- Since:
- 1.0
-
Field Summary
Fields inherited from interface io.micronaut.web.router.Route
DEFAULT_PRODUCES -
Method Summary
Modifier and TypeMethodDescriptionconsumes(io.micronaut.http.MediaType... mediaTypes) Accept the given media type.exclude(io.micronaut.http.HttpMethod... methods) Exclude a particular HTTP method from this resource route.Nest more routes within thisResourceRoute.produces(io.micronaut.http.MediaType... mediaType) Applies the given accepted media type the route.readOnly(boolean readOnly) Whether the route is read-only.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. -
produces
Description copied from interface:RouteApplies the given accepted media type the route.
-