java.lang.Object | ||
↳ | java.beans.PropertyEditorSupport | |
↳ | org.springframework.core.io.support.ResourceArrayPropertyEditor |
Editor for Resource
arrays, to
automatically convert String
location patterns
(e.g. "file:C:/my*.txt"
or "classpath*:myfile.txt"
)
to Resource
array properties. Can also translate a collection
or array of location patterns into a merged Resource array.
The path may contain ${...}
placeholders,
to be resolved as system properties: e.g. ${user.dir}
.
Unresolvable placeholder are ignored by default.
Delegates to a ResourcePatternResolver
,
by default using a PathMatchingResourcePatternResolver
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new ResourceArrayPropertyEditor with a default
PathMatchingResourcePatternResolver and DefaultEnvironment . | |||||||||||
This constructor is deprecated.
as of 3.1 in favor of #ResourceArrayPropertyEditor(ResourcePatternResolver, Environment)
| |||||||||||
Create a new ResourceArrayPropertyEditor with the given
ResourcePatternResolver
and Environment . | |||||||||||
This constructor is deprecated.
as of 3.1 in favor of #ResourceArrayPropertyEditor(ResourcePatternResolver, Environment, boolean)
| |||||||||||
Create a new ResourceArrayPropertyEditor with the given
ResourcePatternResolver
and Environment . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Treat the given text as location pattern and convert it to a Resource array.
| |||||||||||
Treat the given value as collection or array and convert it to a Resource array.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Resolve the given path, replacing placeholders with
corresponding system property values if necessary.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.beans.PropertyEditorSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.beans.PropertyEditor
|
Create a new ResourceArrayPropertyEditor with a default
PathMatchingResourcePatternResolver
and DefaultEnvironment
.
This constructor is deprecated.
as of 3.1 in favor of #ResourceArrayPropertyEditor(ResourcePatternResolver, Environment)
Create a new ResourceArrayPropertyEditor with the given ResourcePatternResolver
and a DefaultEnvironment
.
resourcePatternResolver | the ResourcePatternResolver to use |
---|
Create a new ResourceArrayPropertyEditor with the given ResourcePatternResolver
and Environment
.
resourcePatternResolver | the ResourcePatternResolver to use |
---|---|
propertyResolver | the PropertyResolver to use |
This constructor is deprecated.
as of 3.1 in favor of #ResourceArrayPropertyEditor(ResourcePatternResolver, Environment, boolean)
Create a new ResourceArrayPropertyEditor with the given ResourcePatternResolver
and a DefaultEnvironment
.
resourcePatternResolver | the ResourcePatternResolver to use |
---|---|
ignoreUnresolvablePlaceholders | whether to ignore unresolvable placeholders if no corresponding system property could be found |
Create a new ResourceArrayPropertyEditor with the given ResourcePatternResolver
and Environment
.
resourcePatternResolver | the ResourcePatternResolver to use |
---|---|
propertyResolver | the PropertyResolver to use |
ignoreUnresolvablePlaceholders | whether to ignore unresolvable placeholders if no corresponding system property could be found |
Treat the given text as location pattern and convert it to a Resource array.
Treat the given value as collection or array and convert it to a Resource array. Considers String elements as location patterns, and takes Resource elements as-is.
IllegalArgumentException |
---|
Resolve the given path, replacing placeholders with corresponding system property values if necessary.
path | the original file path |
---|