Annotation Type RestClient


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface RestClient
Marks an interface as a REST client whose methods declare HTTP calls via @GET/@POST/etc. Required on every interface passed to RIP.getClient(Class).
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A property key naming this client's base URL, read only by the optional rest-in-peace-spring-boot-starter module - inert metadata as far as RIP.getClient(Class) and every other core-library consumer is concerned.
    This client's name, read only by the optional rest-in-peace-spring-boot-starter module - as with baseUrlProperty(), inert metadata for every other consumer.
  • Element Details

    • baseUrlProperty

      String baseUrlProperty
      A property key naming this client's base URL, read only by the optional rest-in-peace-spring-boot-starter module - inert metadata as far as RIP.getClient(Class) and every other core-library consumer is concerned. Bridges the one thing BaseUrl can never itself express: a Java annotation attribute must always be a compile-time constant, so it can never hold a runtime-resolved Spring property placeholder. Left unset (the default), the interface must resolve its base URL entirely on its own - a real BaseUrl, or one baked into every method's URL template - exactly as if this attribute didn't exist.
      Returns:
      the property key naming this client's base URL, or empty to rely on BaseUrl instead
      Default:
      ""
    • name

      String name
      This client's name, read only by the optional rest-in-peace-spring-boot-starter module - as with baseUrlProperty(), inert metadata for every other consumer. Used there as the registered Spring bean name and the key under which this client's own settings are looked up. Left unset (the default), the starter falls back to the interface's decapitalized simple name (e.g. UserApi → "userApi").
      Returns:
      this client's name, or empty to derive one from the interface's simple name
      Default:
      ""