Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mbhave opened this issue May 1, 2019 · 1 comment
Closed
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@mbhave
Copy link
Contributor

mbhave commented May 1, 2019

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 1, 2019
@jhoeller jhoeller self-assigned this May 1, 2019
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 1, 2019
@jhoeller jhoeller modified the milestones: 5.2 M2, 5.2 M3 May 1, 2019
@jhoeller jhoeller modified the milestones: 5.2 M3, 5.2 RC1 Jun 11, 2019
@jhoeller jhoeller modified the milestones: 5.2 RC1, 5.x Backlog Jul 29, 2019
@jhoeller jhoeller added the status: duplicate A duplicate of another issue label Aug 2, 2023
@jhoeller jhoeller removed this from the 6.x Backlog milestone Aug 2, 2023
@jhoeller
Copy link
Contributor

jhoeller commented Aug 2, 2023

This is effectively a duplicate of #24845 which we intend to address for 6.1.

@jhoeller jhoeller closed this as completed Aug 2, 2023
@sbrannen sbrannen reopened this Aug 2, 2023
@sbrannen sbrannen closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants