public class PropertySourcesBinder extends Object
PropertySources
.Constructor and Description |
---|
PropertySourcesBinder(ConfigurableEnvironment environment)
Create a new instance using the
Environment as the property sources. |
PropertySourcesBinder(PropertySource<?> propertySource)
Create a new instance from a single
PropertySource . |
PropertySourcesBinder(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 . |
ConversionService |
getConversionService() |
PropertySources |
getPropertySources() |
void |
setConversionService(ConversionService conversionService) |
void |
setPropertySources(PropertySources propertySources) |
public PropertySourcesBinder(PropertySources propertySources)
propertySources
- the PropertySources
to usepublic PropertySourcesBinder(PropertySource<?> propertySource)
PropertySource
.propertySource
- the PropertySource
to usepublic PropertySourcesBinder(ConfigurableEnvironment environment)
Environment
as the property sources.environment
- the environmentpublic void setPropertySources(PropertySources propertySources)
public PropertySources getPropertySources()
public void setConversionService(ConversionService conversionService)
public 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 © 2018 Pivotal Software, Inc.. All rights reserved.