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
ConstructorsConstructorDescriptionResourceEditorRegistrar(ResourceLoader resourceLoader, PropertyResolver propertyResolver) Create a new ResourceEditorRegistrar for the givenResourceLoaderandPropertyResolver. -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterCustomEditors(PropertyEditorRegistry registry) Populate the givenregistrywith the following resource editors: ResourceEditor, InputStreamEditor, InputSourceEditor, FileEditor, URLEditor, URIEditor, ClassEditor, ClassArrayEditor.
-
Constructor Details
-
ResourceEditorRegistrar
Create a new ResourceEditorRegistrar for the givenResourceLoaderandPropertyResolver.- 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 givenregistrywith 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:
registerCustomEditorsin interfacePropertyEditorRegistrar- Parameters:
registry- thePropertyEditorRegistryto register the customPropertyEditorswith- See Also:
-