Annotation 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
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Only to be used in conjunction withproperty()
.boolean
-
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 defaultValueOnly to be used in conjunction withproperty()
.- Returns:
- The default value if the configuration key is not present
- Default:
- true
-