Package io.micronaut.http.annotation
Annotation Interface Get
Annotation that can be applied to method to signify the method receives a
HttpMethod.GET
.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
The default consumes.boolean
String[]
Shortcut that allows setting both theconsumes()
andproduces()
settings to the same media type.String[]
boolean
String[]
Only to be used in the context of a server.
-
Element Details
-
value
@AliasFor(annotation=HttpMethodMapping.class,member="value") @AliasFor(annotation=UriMapping.class,member="value") String value- Returns:
- The URI of the GET route
- Default:
- "/"
-
uri
@AliasFor(annotation=HttpMethodMapping.class,member="value") @AliasFor(annotation=UriMapping.class,member="value") String uri- Returns:
- The URI of the GET route
- Default:
- "/"
-
uris
@AliasFor(annotation=HttpMethodMapping.class,member="uris") @AliasFor(annotation=UriMapping.class,member="uris") String[] urisOnly to be used in the context of a server.- Returns:
- The URIs of the GET route
- Default:
- {"/"}
-
produces
- Returns:
- The default produces, otherwise override from controller
- Default:
- {}
-
consumes
The default consumes. Ignored for server request which never a consume a value for a GET request.- Returns:
- The default consumes, otherwise override from controller
- Default:
- {}
-
processes
@AliasFor(annotation=Produces.class,member="value") @AliasFor(annotation=Consumes.class,member="value") String[] processesShortcut that allows setting both theconsumes()
andproduces()
settings to the same media type.- Returns:
- The media type this method processes
- Default:
- {}
-
single
@AliasFor(annotation=Produces.class,member="single") @AliasFor(annotation=Consumes.class,member="single") @AliasFor(annotation=SingleResult.class,member="value") boolean single- Returns:
- Whether a single or multiple items are produced/consumed
- Default:
- false
-
headRoute
boolean headRoute- Returns:
- True if a HEAD route should also be registered for the same method
- Default:
- true
-