Class ConsulConfigProperties
- java.lang.Object
-
- org.springframework.cloud.consul.config.ConsulConfigProperties
-
@ConfigurationProperties("spring.cloud.consul.config") @Validated public class ConsulConfigProperties extends Object- Author:
- Spencer Gibb
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConsulConfigProperties.FormatThere 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).static classConsulConfigProperties.WatchConsul watch properties.
-
Constructor Summary
Constructors Constructor Description ConsulConfigProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgetAclToken()@NotEmpty StringgetDataKey()@NotEmpty StringgetDefaultContext()@NotNull ConsulConfigProperties.FormatgetFormat()StringgetName()StringgetPrefix()List<String>getPrefixes()@NotEmpty StringgetProfileSeparator()ConsulConfigProperties.WatchgetWatch()voidinit()booleanisEnabled()booleanisFailFast()voidsetAclToken(String aclToken)voidsetDataKey(@NotEmpty String dataKey)voidsetDefaultContext(@NotEmpty String defaultContext)voidsetEnabled(boolean enabled)voidsetFailFast(boolean failFast)voidsetFormat(@NotNull ConsulConfigProperties.Format format)voidsetName(String name)voidsetPrefix(String prefix)Deprecated.voidsetPrefixes(List<String> prefixes)voidsetProfileSeparator(@NotEmpty String profileSeparator)voidsetWatch(ConsulConfigProperties.Watch watch)StringtoString()
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
Prefix for configuration properties.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
@PostConstruct public void init()
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
getPrefix
@DeprecatedConfigurationProperty(reason="replaced to support multiple prefixes", replacement="spring.cloud.consul.config.prefixes") public String getPrefix()
-
setPrefix
@Deprecated public void setPrefix(String prefix)
Deprecated.
-
getDefaultContext
@NotEmpty public @NotEmpty String getDefaultContext()
-
setDefaultContext
public void setDefaultContext(@NotEmpty @NotEmpty String defaultContext)
-
getProfileSeparator
@NotEmpty public @NotEmpty String getProfileSeparator()
-
setProfileSeparator
public void setProfileSeparator(@NotEmpty @NotEmpty String profileSeparator)
-
getFormat
@NotNull public @NotNull ConsulConfigProperties.Format getFormat()
-
setFormat
public void setFormat(@NotNull @NotNull ConsulConfigProperties.Format format)
-
getDataKey
@NotEmpty public @NotEmpty String getDataKey()
-
setDataKey
public void setDataKey(@NotEmpty @NotEmpty String dataKey)
-
getAclToken
public String getAclToken()
-
setAclToken
public void setAclToken(String aclToken)
-
getWatch
public ConsulConfigProperties.Watch getWatch()
-
setWatch
public void setWatch(ConsulConfigProperties.Watch watch)
-
isFailFast
public boolean isFailFast()
-
setFailFast
public void setFailFast(boolean failFast)
-
getName
public String getName()
-
setName
public void setName(String name)
-
-