Class ResourceEditorRegistrar
java.lang.Object
org.springframework.beans.support.ResourceEditorRegistrar
- All Implemented Interfaces:
PropertyEditorRegistrar
PropertyEditorRegistrar implementation that populates a given
PropertyEditorRegistry
(typically a BeanWrapper
used for bean
creation within an ApplicationContext
)
with resource editors. Used by
AbstractApplicationContext
.- Since:
- 2.0
- Author:
- Juergen Hoeller, Chris Beams
-
Constructor Summary
ConstructorDescriptionResourceEditorRegistrar
(ResourceLoader resourceLoader, PropertyResolver propertyResolver) Create a new ResourceEditorRegistrar for the givenResourceLoader
andPropertyResolver
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerCustomEditors
(PropertyEditorRegistry registry) Populate the givenregistry
with the following resource editors: ResourceEditor, InputStreamEditor, InputSourceEditor, FileEditor, URLEditor, URIEditor, ClassEditor, ClassArrayEditor.
-
Constructor Details
-
ResourceEditorRegistrar
Create a new ResourceEditorRegistrar for the givenResourceLoader
andPropertyResolver
.- Parameters:
resourceLoader
- the ResourceLoader (or ResourcePatternResolver) to create editors for (usually an ApplicationContext)propertyResolver
- the PropertyResolver (usually an Environment)- See Also:
-
-
Method Details
-
registerCustomEditors
Populate the givenregistry
with the following resource editors: ResourceEditor, InputStreamEditor, InputSourceEditor, FileEditor, URLEditor, URIEditor, ClassEditor, ClassArrayEditor.If this registrar has been configured with a
ResourcePatternResolver
, a ResourceArrayPropertyEditor will be registered as well.- Specified by:
registerCustomEditors
in interfacePropertyEditorRegistrar
- Parameters:
registry
- thePropertyEditorRegistry
to register the customPropertyEditors
with- See Also:
-