Skip to content

Consider making @Value consistent for resource arrays and collections #22868

@mbhave

Description

@mbhave

For Resource arrays, the ResourceArrayPropertyEditor will convert the location pattern to an array of resources. However, if @Value is present on a Collection<Resource>, you get a Resource that you then probably have to call getPath() on and use a ResourcePatternResolver to resolve that. It seems like it would be useful to make @Value consistent for resource collections and arrays.

This was originally raised in Spring Boot issue for @ConfigurationProperties. We'd like to be consistent with what Framework does for @Value.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions