@ConfigurationProperties(value="spring.cloud.consul.config") @Validated public class ConsulConfigProperties extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ConsulConfigProperties.Format
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).
|
static class |
ConsulConfigProperties.Watch
Consul watch properties.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFIX
Prefix for configuration properties.
|
| Constructor and Description |
|---|
ConsulConfigProperties() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAclToken() |
@NotEmpty String |
getDataKey() |
@NotEmpty String |
getDefaultContext() |
@NotNull ConsulConfigProperties.Format |
getFormat() |
String |
getName() |
String |
getPrefix() |
List<String> |
getPrefixes() |
@NotEmpty String |
getProfileSeparator() |
ConsulConfigProperties.Watch |
getWatch() |
void |
init() |
boolean |
isEnabled() |
boolean |
isFailFast() |
void |
setAclToken(String aclToken) |
void |
setDataKey(@NotEmpty String dataKey) |
void |
setDefaultContext(@NotEmpty String defaultContext) |
void |
setEnabled(boolean enabled) |
void |
setFailFast(boolean failFast) |
void |
setFormat(@NotNull ConsulConfigProperties.Format format) |
void |
setName(String name) |
void |
setPrefix(String prefix)
Deprecated.
|
void |
setPrefixes(List<String> prefixes) |
void |
setProfileSeparator(@NotEmpty String profileSeparator) |
void |
setWatch(ConsulConfigProperties.Watch watch) |
String |
toString() |
public static final String PREFIX
@PostConstruct public void init()
public boolean isEnabled()
public void setEnabled(boolean enabled)
@DeprecatedConfigurationProperty(reason="replaced to support multiple prefixes",
replacement="spring.cloud.consul.config.prefixes")
public String getPrefix()
@Deprecated public void setPrefix(String prefix)
@NotEmpty public @NotEmpty String getDefaultContext()
public void setDefaultContext(@NotEmpty
@NotEmpty String defaultContext)
@NotEmpty public @NotEmpty String getProfileSeparator()
public void setProfileSeparator(@NotEmpty
@NotEmpty String profileSeparator)
@NotNull public @NotNull ConsulConfigProperties.Format getFormat()
public void setFormat(@NotNull
@NotNull ConsulConfigProperties.Format format)
@NotEmpty public @NotEmpty String getDataKey()
public void setDataKey(@NotEmpty
@NotEmpty String dataKey)
public String getAclToken()
public void setAclToken(String aclToken)
public ConsulConfigProperties.Watch getWatch()
public void setWatch(ConsulConfigProperties.Watch watch)
public boolean isFailFast()
public void setFailFast(boolean failFast)
public String getName()
public void setName(String name)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.