public class PropertySourcesBinder extends Object
PropertySources.| Constructor and Description |
|---|
PropertySourcesBinder(org.springframework.core.env.ConfigurableEnvironment environment)
Create a new instance using the
Environment as the property sources. |
PropertySourcesBinder(org.springframework.core.env.PropertySource<?> propertySource)
Create a new instance from a single
PropertySource. |
PropertySourcesBinder(org.springframework.core.env.PropertySources propertySources)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindTo(String prefix,
Object target)
Bind the specified
target from the environment using the prefix. |
Map<String,Object> |
extractAll(String prefix)
Extract the keys using the specified
prefix. |
org.springframework.core.convert.ConversionService |
getConversionService() |
org.springframework.core.env.PropertySources |
getPropertySources() |
void |
setConversionService(org.springframework.core.convert.ConversionService conversionService) |
void |
setPropertySources(org.springframework.core.env.PropertySources propertySources) |
public PropertySourcesBinder(org.springframework.core.env.PropertySources propertySources)
propertySources - the PropertySources to usepublic PropertySourcesBinder(org.springframework.core.env.PropertySource<?> propertySource)
PropertySource.propertySource - the PropertySource to usepublic PropertySourcesBinder(org.springframework.core.env.ConfigurableEnvironment environment)
Environment as the property sources.environment - the environmentpublic void setPropertySources(org.springframework.core.env.PropertySources propertySources)
public org.springframework.core.env.PropertySources getPropertySources()
public void setConversionService(org.springframework.core.convert.ConversionService conversionService)
public org.springframework.core.convert.ConversionService getConversionService()
public Map<String,Object> extractAll(String prefix)
prefix. The prefix won't be included.
Any key that starts with the prefix will be included.
prefix - the prefix to useCopyright © 2017 Pivotal Software, Inc.. All rights reserved.