Annotation Interface Sensitive


@Documented @Retention(RUNTIME) @Target(METHOD) @Inherited public @interface Sensitive
Annotation that can be applied to endpoint methods to control sensitivity at the method level. For example: {@literal @}Endpoint(id = "loggers", prefix = "myapp") public class LoggersEndpoint { {@literal @}Write {@literal @}Sensitive(property = "write-sensitive", defaultValue = true) public void setLogLevel@Selector String name) { } } The configuration key myapp.loggers.write-sensitive will determine the sensitivity of the method, defaulting to true if not present.
Since:
2.0.0
Author:
James Kleeh
  • Element Details

    • value

      boolean value
      Returns:
      True if the method is sensitive
      Default:
      true
    • property

      String property
      Returns:
      The configuration key to determine sensitivity. Automatically determines the configuration prefix from the endpoint annotation.
      Default:
      ""
    • defaultValue

      boolean defaultValue
      Only to be used in conjunction with property().
      Returns:
      The default value if the configuration key is not present
      Default:
      true