public class ConsulPropertySource
extends org.springframework.core.env.EnumerablePropertySource<com.ecwid.consul.v1.ConsulClient>
构造器和说明 |
---|
ConsulPropertySource(String context,
com.ecwid.consul.v1.ConsulClient source,
ConsulConfigProperties configProperties) |
限定符和类型 | 方法和说明 |
---|---|
protected Properties |
generateProperties(String value,
ConsulConfigProperties.Format format) |
protected ConsulConfigProperties |
getConfigProperties() |
protected String |
getContext() |
String |
getDecoded(String value)
已过时。
As of 1.1.0 use
GetValue.getDecodedValue() . |
Long |
getInitialIndex() |
protected Map<String,Object> |
getProperties() |
Object |
getProperty(String name) |
String[] |
getPropertyNames() |
void |
init() |
protected void |
parse(com.ecwid.consul.v1.Response<List<com.ecwid.consul.v1.kv.model.GetValue>> response) |
protected void |
parsePropertiesInKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values)
Parses the properties in key value style i.e., values are expected to be
either a sub key or a constant
|
protected void |
parsePropertiesWithNonKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values,
ConsulConfigProperties.Format format)
Parses the properties using the format which is not a key value style i.e.,
either java properties style or YAML style
|
protected void |
parseValue(com.ecwid.consul.v1.kv.model.GetValue getValue,
ConsulConfigProperties.Format format) |
public ConsulPropertySource(String context, com.ecwid.consul.v1.ConsulClient source, ConsulConfigProperties configProperties)
public void init()
protected void parse(com.ecwid.consul.v1.Response<List<com.ecwid.consul.v1.kv.model.GetValue>> response)
public Long getInitialIndex()
protected void parsePropertiesInKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values)
values
- protected void parsePropertiesWithNonKeyValueFormat(List<com.ecwid.consul.v1.kv.model.GetValue> values, ConsulConfigProperties.Format format)
values
- protected void parseValue(com.ecwid.consul.v1.kv.model.GetValue getValue, ConsulConfigProperties.Format format)
protected Properties generateProperties(String value, ConsulConfigProperties.Format format)
@Deprecated public String getDecoded(String value)
GetValue.getDecodedValue()
.protected ConsulConfigProperties getConfigProperties()
protected String getContext()
public Object getProperty(String name)
getProperty
在类中 org.springframework.core.env.PropertySource<com.ecwid.consul.v1.ConsulClient>
public String[] getPropertyNames()
getPropertyNames
在类中 org.springframework.core.env.EnumerablePropertySource<com.ecwid.consul.v1.ConsulClient>
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.