Class DefaultPropertySourceFactory
- java.lang.Object
- org.springframework.core.io.support.DefaultPropertySourceFactory
- All Implemented Interfaces:
PropertySourceFactory
public class DefaultPropertySourceFactory extends Object implements PropertySourceFactory
The default implementation forPropertySourceFactory
, wrapping every resource in aResourcePropertySource
.- Since:
- 4.3
- Author:
- Juergen Hoeller
- See Also:
PropertySourceFactory
,ResourcePropertySource
Constructor Summary
Constructors Constructor Description DefaultPropertySourceFactory()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertySource<?>
createPropertySource(String name, EncodedResource resource)
Create aPropertySource
that wraps the given resource.
Constructor Detail
DefaultPropertySourceFactory
public DefaultPropertySourceFactory()
Method Detail
createPropertySource
public PropertySource<?> createPropertySource(@Nullable String name, EncodedResource resource) throws IOException
Description copied from interface:PropertySourceFactory
Create aPropertySource
that wraps the given resource.- Specified by:
createPropertySource
in interfacePropertySourceFactory
- Parameters:
name
- the name of the property source (can benull
in which case the factory implementation will have to generate a name based on the given resource)resource
- the resource (potentially encoded) to wrap- Returns:
- the new
PropertySource
(nevernull
) - Throws:
IOException
- if resource resolution failed