-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
PathMatchingResourcePatternResolver regression for jar root scanning in 6.2.4 #34607
Comments
Could you please provide a minimal reproducer as an attached project or a link to a repository allowing to see change of behavior? |
That's hard. As mentioned, locally running the project will not give any insights, it only happens when running the real deal and connecting through remote debugging. The code will simply be the line shown above, the setup is highly manual anyway. |
Could you try to debug through Between 6.2.3 and 6.2.4, we only had one defensive change in terms of jar entries caching (#34446) which I don't see as immediately related. Maybe that specific part if worth debugging though, just in case we were missing a side effect there: see To be clear, |
I'll try, I already did, but I'll try more. A lot is happening there and indeed, caching is probably impacting behavior, so I only get to dive in once per application restart. |
If that is easier to do for a start, let's double-check the behavioral difference between 6.2.3 and 6.2.4: There is just that one change in Aside from downgrading to 6.2.3, you could also manually patch |
Potentially, this regression could also be caused by #34528 - a change in If this is the case in your scenario, we'd need to debug Again, you could manually patch |
Alright, thanks for double-checking! The change is pushed in the meantime, to be available in the upcoming 6.2.5-SNAPSHOT in a few minutes. Please give the snapshot a try, this is a different implementation aiming to accommodate all of the requirements. Since this is a painful regression in the scenarios affected, we intend to release 6.2.5 out-of-cycle: this Thursday along with Boot 3.4.4. It'd be great to confirm that everything is in order before that follow-up release, so integration testing is highly appreciated. |
The |
Great to hear, thanks for the immediate turnaround! |
Hi,
We are heavily relying on the
ResourceLoader
and more specifically theorg.springframework.core.io.support.PathMatchingResourcePatternResolver
. In a legacy codebase that we own, we are using this call very often:applicationContext.getResources("classpath*:**/some-file-pattern.xml")
or any other type of pattern.Since version
6.2.4
we clearly see a difference in behavior here. Compared to version6.2.3
we observe that now nothing is returned while it was returning the expected resources in the previous version.We also see a difference in behavior when running locally from IntelliJ compared to running the final WAR. Running locally in IntelliJ (which is obviously more 'File based' scanning than 'Jar based' scanning) everything works. Running in the final WAR, everything fails.
As it only occurs in the final runtime, it is very difficult to analyze the Spring code to pinpoint where the difference in behavior is caused. We do see changes in
org.springframework.core.io.support.PathMatchingResourcePatternResolver
as of 6.2.x and a small Exception change in 6.2.4, but we couldn't point to that 100% as being the root cause.Can you help us out here? What could have caused this difference in behavior ?
The text was updated successfully, but these errors were encountered: