Consider making @Value consistent for resource arrays and collections #22868
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
type: enhancement
A general enhancement
For
Resource
arrays, theResourceArrayPropertyEditor
will convert the location pattern to an array of resources. However, if@Value
is present on aCollection<Resource>
, you get aResource
that you then probably have to callgetPath()
on and use aResourcePatternResolver
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
.The text was updated successfully, but these errors were encountered: