Search in sources :

Example 11 with RelaxedDataBinder

use of org.springframework.boot.bind.RelaxedDataBinder in project spring-boot by spring-projects.

the class MustacheEnvironmentCollector method setEnvironment.

@Override
public void setEnvironment(Environment environment) {
    this.environment = (ConfigurableEnvironment) environment;
    this.target = new HashMap<>();
    new RelaxedDataBinder(this.target).bind(new PropertySourcesPropertyValues(this.environment.getPropertySources()));
    this.propertyResolver = new RelaxedPropertyResolver(environment);
}
Also used : RelaxedDataBinder(org.springframework.boot.bind.RelaxedDataBinder) RelaxedPropertyResolver(org.springframework.boot.bind.RelaxedPropertyResolver) PropertySourcesPropertyValues(org.springframework.boot.bind.PropertySourcesPropertyValues)

Aggregations

RelaxedDataBinder (org.springframework.boot.bind.RelaxedDataBinder)11 MutablePropertyValues (org.springframework.beans.MutablePropertyValues)9 Test (org.junit.Test)7 PropertySourcesPropertyValues (org.springframework.boot.bind.PropertySourcesPropertyValues)2 PropertyValues (org.springframework.beans.PropertyValues)1 RelaxedPropertyResolver (org.springframework.boot.bind.RelaxedPropertyResolver)1 MutablePropertySources (org.springframework.core.env.MutablePropertySources)1 PropertiesPropertySource (org.springframework.core.env.PropertiesPropertySource)1