use of org.springframework.boot.context.properties.bind.PropertySourcesPlaceholdersResolver in project spring-cloud-stream by spring-cloud.
the class EnvironmentEntryInitializingTreeMap method put.
@Override
public T put(String key, T value) {
// boot 2 call this first
Binder binder = new Binder(ConfigurationPropertySources.get(environment), new PropertySourcesPlaceholdersResolver(environment), this.conversionService, null);
binder.bind(defaultsPrefix, Bindable.ofInstance(value));
return this.delegate.put(key, value);
}
use of org.springframework.boot.context.properties.bind.PropertySourcesPlaceholdersResolver in project spring-cloud-stream by spring-cloud.
the class EnvironmentEntryInitializingTreeMap method get.
@Override
public T get(Object key) {
if (!this.delegate.containsKey(key) && key instanceof String) {
T entry = BeanUtils.instantiateClass(entryClass);
Binder binder = new Binder(ConfigurationPropertySources.get(environment), new PropertySourcesPlaceholdersResolver(environment), this.conversionService, null);
binder.bind(defaultsPrefix, Bindable.ofInstance(entry));
this.delegate.put((String) key, entry);
}
return this.delegate.get(key);
}
Aggregations