-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
Does not work 'classpath*:' for Resource[] property on configuration properties since 2.x #15835
Comments
Thanks for the sample. There's some similarity to the problem described in #12166. In 1.5, the conversion is handled by Framework's Here's an addition to
Binding to a collection exhibits the same problem. |
I'm not totally sure that we should try and support pattern expansion in the same way as the |
We're going to deal with this on a case-by-case basis. We'll add only the resource array and resource collection property editors for now. |
The Spring Framework |
Just to add some more info from #12993 (comment). When using For example doing: @Value("${dummy.dummy-files}")
private Resource[] resources; |
Thanks, @filiphr. We're already aware that |
Thanks for clearing it up @wilkinsona. I was only trying to bring some more information from the other issue (although I have no doubt that you are on top of it 😄). |
The Framework issue has moved into the 5.x backlog so we're unlikely to be able to tackle this in 2.1.x or even 2.2.x. |
Hello team, any news about this issue? |
@LeoFuso nothing that wouldn't be available here. As noted above, we've opened a Spring Framework issue that still unresolved, see #15835 (comment) |
I think this is related and has a work around in the question. |
It looks like there's going to be a change in Framework 6.1. We should see what, if anything, we can do in Boot 3.2. |
Framework now consistently converts a pattern to multiple resources whether it's a |
I encountered a un-expected behavior on configuration properties feature since Spring Boot 2.x.
On 1.5.x, it work fine.
Conditions
Resource[]
on custom configuration properties classclasspath*:
prefix such asclasspath*:files/*.txt
Expected result
Resource
instance that matches pattern stringActual result
Resource
that holds a specify pattern string such asclasspath*:files/*.txt
Repro test
demo.zip
The text was updated successfully, but these errors were encountered: