public class ResourceEditorRegistrar extends java.lang.Object implements PropertyEditorRegistrar
PropertyEditorRegistry
(typically a BeanWrapper
used for bean
creation within an ApplicationContext
)
with resource editors. Used by
AbstractApplicationContext
.Constructor and Description |
---|
ResourceEditorRegistrar(ResourceLoader resourceLoader,
PropertyResolver propertyResolver)
Create a new ResourceEditorRegistrar for the given
ResourceLoader
and PropertyResolver . |
Modifier and Type | Method and Description |
---|---|
void |
registerCustomEditors(PropertyEditorRegistry registry)
Populate the given
registry with the following resource editors:
ResourceEditor, InputStreamEditor, InputSourceEditor, FileEditor, URLEditor,
URIEditor, ClassEditor, ClassArrayEditor. |
public ResourceEditorRegistrar(ResourceLoader resourceLoader, PropertyResolver propertyResolver)
ResourceLoader
and PropertyResolver
.resourceLoader
- the ResourceLoader (or ResourcePatternResolver)
to create editors for (usually an ApplicationContext)propertyResolver
- the PropertyResolver (usually an Environment)Environment
,
ResourcePatternResolver
,
ApplicationContext
public void registerCustomEditors(PropertyEditorRegistry registry)
registry
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.
registerCustomEditors
in interface PropertyEditorRegistrar
registry
- the PropertyEditorRegistry
to register the
custom PropertyEditors
withResourceEditor
,
InputStreamEditor
,
InputSourceEditor
,
FileEditor
,
URLEditor
,
URIEditor
,
ClassEditor
,
ClassArrayEditor
,
ResourceArrayPropertyEditor