createPropertyResolver method
- @protected
- MutablePropertySources propertySources
Factory for Property Resolver
Creates a new PropertySourcesPropertyResolver bound to the given
propertySources
. This resolver provides property lookup, conversion,
and placeholder resolution based on the ordered list of sources.
Parameters
propertySources
: a mutable, ordered collection of property sources (e.g., environment variables, property files, system properties).
Returns
A ConfigurablePropertyResolver implementation backed by the provided property sources.
Example
final sources = MutablePropertySources();
final resolver = createPropertyResolver(sources);
print(resolver.getProperty('app.name'));
Notes
- Marked
@protected
, intended for subclass customization. - Subclasses can override to provide an alternate resolver strategy.
Implementation
@protected
ConfigurablePropertyResolver createPropertyResolver(MutablePropertySources propertySources) {
return PropertySourcesPropertyResolver(propertySources);
}