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
.
Comment From: jhoeller
This is effectively a duplicate of #24845 which we intend to address for 6.1.