Enum ConsulConfigProperties.Format
java.lang.Object
java.lang.Enum<ConsulConfigProperties.Format>
org.springframework.cloud.consul.config.ConsulConfigProperties.Format
- All Implemented Interfaces:
Serializable,Comparable<ConsulConfigProperties.Format>,java.lang.constant.Constable
- Enclosing class:
- ConsulConfigProperties
There are many ways in which we can specify configuration in consul i.e.,
- Nested key value style: Where value is either a constant or part of the key (nested). For e.g., For following configuration a.b.c=something a.b.d=something else One can specify the configuration in consul with key as "../kv/config/application/a/b/c" and value as "something" and key as "../kv/config/application/a/b/d" and value as "something else"
- Entire contents of properties file as value For e.g., For following configuration a.b.c=something a.b.d=something else One can specify the configuration in consul with key as "../kv/config/application/properties" and value as whole configuration " a.b.c=something a.b.d=something else "
- as Json or YML. You get it.
- Author:
- srikalyan.swayampakula
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that the configuration specified in consul uses keys as files.Indicates that the configuration specified in consul is of type native key values.Indicates that the configuration specified in consul is of property style i.e., value of the consul key would be a list of key=value pairs separated by new lines.Indicates that the configuration specified in consul is of YAML style i.e., value of the consul key would be YAML format. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static ConsulConfigProperties.Format[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
KEY_VALUE
Indicates that the configuration specified in consul is of type native key values. -
PROPERTIES
Indicates that the configuration specified in consul is of property style i.e., value of the consul key would be a list of key=value pairs separated by new lines. -
YAML
Indicates that the configuration specified in consul is of YAML style i.e., value of the consul key would be YAML format. -
FILES
Indicates that the configuration specified in consul uses keys as files. This is useful for tools like git2consul.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-