-
Notifications
You must be signed in to change notification settings - Fork 38.5k
PathMatchingResourcePatternResolver no longer finds directories #29333
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
Comments
I imagine this is due to the change in d21eea7, since we explicitly only return "regular files" as a result of that. @wilkinsona had reported a regression in that we started returning directories and had not done so before. And now this issue is claiming that we did previously return directories and no longer do. So these two claims seem to contradict, but perhaps it's due to a nuance in the patterns that are used. |
I just confirmed that removing So if we revert that change, we'll need to investigate a different solution to the issue raised by @wilkinsona. |
spring-projects/spring-boot@7eb8abb is the change that I had to make when the behaviour first changed and spring-projects/spring-boot@03b3a77 is the change after d21eea7. Hopefully the tests that were affected show the patterns that were involved. |
It looks like the difference between returning directories and not is that a pattern like |
Update: I do not have time to resolve this issue before the 6.0 RC2 release tomorrow; however, I have checked in tests that verify the status quo for The disabled tests should help us to sort out the differences between |
Possibly caused by 0eb6678
simple app here https://github.com/spencergibb/path-matching-regression
With boot 2.7/framework 5.3
[file:/[pathtorepo]/configdir/subdir/]
is returned from matchingDirectories.In boot 3 snap and framework 6, an empty list is returned.
Original method is here https://github.com/spring-cloud/spring-cloud-config/blob/670bdd7b5d8d8ad1dd53be914063cc6534205e24/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/support/AbstractScmAccessor.java#L256-L270
Failing tests are https://github.com/spring-cloud/spring-cloud-config/blob/670bdd7b5d8d8ad1dd53be914063cc6534205e24/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/JGitEnvironmentRepositoryTests.java#L168-L177
and
https://github.com/spring-cloud/spring-cloud-config/blob/670bdd7b5d8d8ad1dd53be914063cc6534205e24/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/environment/JGitEnvironmentRepositoryIntegrationTests.java#L234-L246
/cc @bclozel @jhoeller @sbrannen @ryanjbaxter
The text was updated successfully, but these errors were encountered: