Annotation Type GZIP


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface GZIP
Used to annotate endpoints that will have their payload compressed with gzip unconditionally.

Note that using this annotation will disregard any form of content encoding negotiation for the endpoint. This should only be used on endpoints that produce significant payloads.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Indicate that the payload is already compressed.
    If non-empty, only contents compatible with any of the specified media type will be compressed.
  • Element Details

    • mediaTypes

      String[] mediaTypes
      If non-empty, only contents compatible with any of the specified media type will be compressed.
      See Also:
      • MediaType.isCompatible(MediaType)
      Default:
      {}
    • alreadyCompressed

      boolean alreadyCompressed
      Indicate that the payload is already compressed.

      When that is the case, the decorator should only append a Content-Encoding: gzip header, but not alter the entity.

      Default:
      false