use of org.springframework.boot.env.YamlPropertySourceLoader in project spring-cloud-open-service-broker by spring-cloud.
the class ServiceBrokerPropertiesBindingTest method bindFullValidYaml.
@Test
void bindFullValidYaml() throws Exception {
this.context.register(ServiceBrokerPropertiesConfiguration.class);
Resource resource = context.getResource("classpath:catalog-full.yml");
YamlPropertySourceLoader sourceLoader = new YamlPropertySourceLoader();
List<PropertySource<?>> properties = sourceLoader.load("catalog", resource);
context.getEnvironment().getPropertySources().addFirst(properties.get(0));
validateFullCatalog();
}
Aggregations