Package io.smallrye.stork.api.config
Annotation Interface ServiceRegistrarAttribute
@Retention(RUNTIME)
@Target(TYPE)
@Repeatable(ServiceRegistrarAttributes.class)
public @interface ServiceRegistrarAttribute
Defines an attribute for a service registrar.
The name of the attribute corresponds to the value used in the configuration, e.g. for name
my-attribute,
use the following to set the value:
stork-registrar.<my-registrar>.my-attribute
In the configuration class generated for the service registrar, this attribute will be exposed through
getMyAttribute()-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionDescription of the attribute.Attribute name as used in the configuration. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDefault value for the attribute.booleanWhether the attribute is mandatory or optional
-
Element Details
-
name
String nameAttribute name as used in the configuration. Exposed through a getter with name converted to camelCase with characters that cannot be used in a java identifiers filtered out.- Returns:
- the name of the configuration property
-
description
String descriptionDescription of the attribute. Works best in the documentation if it starts with a capital letter and ends with period.- Returns:
- the description
-
-
-
defaultValue
String defaultValueDefault value for the attribute. If not provided and user didn't set the value - null will be passed- Returns:
- the default value
- Default:
- "__$$_DEFAULT_VALUE_$$__"
-
required
boolean requiredWhether the attribute is mandatory or optional- Returns:
- true if the attribute is required, false otherwise
- Default:
- false
-