Annotation Interface Idempotent


@Target({METHOD,TYPE}) @Retention(RUNTIME) public @interface Idempotent
Enables server-side idempotency for write APIs. Usage: annotate controller method (usually a create/submit endpoint). Client should send header Idempotency-Key (or X-Request-Id) with a stable value per logical action.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    When true, missing idempotency key will be rejected.
    int
    TTL for cached result / in-flight marker.
  • Element Details

    • ttlSeconds

      int ttlSeconds
      TTL for cached result / in-flight marker.
      Default:
      600
    • requireKey

      boolean requireKey
      When true, missing idempotency key will be rejected. Default false for backward compatibility.
      Default:
      false