Annotation Type Get


  • @Documented
    @Retention(RUNTIME)
    @Target(METHOD)
    @HttpMethodMapping
    @Inherited
    public @interface Get
    Annotation that can be applied to method to signify the method receives a HttpMethod.GET.
    Since:
    1.0
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String[] consumes
      The default consumes.
      boolean headRoute  
      java.lang.String[] processes
      Shortcut that allows setting both the consumes() and produces() settings to the same media type.
      java.lang.String[] produces  
      boolean single
      Shortcut that allows setting both the Consumes and Produces single settings.
      java.lang.String uri  
      java.lang.String[] uris
      Only to be used in the context of a server.
      java.lang.String value  
    • Element Detail

      • uris

        @AliasFor(annotation=HttpMethodMapping.class,member="uris") @AliasFor(annotation=UriMapping.class,member="uris")
        java.lang.String[] uris
        Only to be used in the context of a server.
        Returns:
        The URIs of the GET route
        Default:
        {"/"}
      • produces

        @AliasFor(annotation=Produces.class,
                  member="value")
        java.lang.String[] produces
        Returns:
        The default produces, otherwise override from controller
        Default:
        {}
      • consumes

        @AliasFor(annotation=Consumes.class,
                  member="value")
        java.lang.String[] 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")
        java.lang.String[] processes
        Shortcut that allows setting both the consumes() and produces() 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=io.micronaut.core.async.annotation.SingleResult.class,member="value")
        boolean single
        Shortcut that allows setting both the Consumes and Produces single settings.
        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