Overview
CompositePropertySource currently supports adding individual PropertySource instances via its addPropertySource(PropertySource<?>) and addFirstPropertySource(PropertySource<?>) methods; however, there is no way to construct a new CompositePropertySource from an existing collection of property sources, such as an instance of MutablePropertySources.
To support such use cases, we should introduce a CompositePropertySource(String, Iterable<PropertySource<?>>) constructor, where Iterable<PropertySource<?>> supports collections as well as PropertySources implementations.
Related Issues
Overview
CompositePropertySourcecurrently supports adding individualPropertySourceinstances via itsaddPropertySource(PropertySource<?>)andaddFirstPropertySource(PropertySource<?>)methods; however, there is no way to construct a newCompositePropertySourcefrom an existing collection of property sources, such as an instance ofMutablePropertySources.To support such use cases, we should introduce a
CompositePropertySource(String, Iterable<PropertySource<?>>)constructor, whereIterable<PropertySource<?>>supports collections as well asPropertySourcesimplementations.Related Issues
PropertySourcesPlaceholderConfigurerplaceholder resolution fails in several scenarios #34861