-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Spring Boot 3.2.2 breaks SpEL interpretation #39261
Comments
I can't think of a recent change or regression here. Can you share a minimal sample application that reproduces the problem? Thanks! |
I'd like to and if you have any guidance on paring down a large API-server Spring Boot application to a minimal example which doesn't expose too much company code, let me know. This is my first time working with Spring. |
You can start from a a simple application created on https://start.spring.io with the relevant dependencies (Spring Data REST and Spring Security from what I can see) and add bit by bit classes to reproduce the problem. If you can't reproduce the issue when you've reached the point where the code snippet shown above is mostly there, this means that you'll need to investigate a bit more. |
You might also try adding a exception breakpoint for |
It may be duplicate of spring-projects/spring-framework#32087. |
Thanks very much, @aholland. That confirms that this is a duplicate of spring-projects/spring-framework#32087 as @quaff suspected. If you have time, please try Spring Framework 6.1.4-SNAPSHOT (available from https://repo.spring.io/snapshot) and confirm that it fixes the problem for you. |
@wilkinsona Yes, that fixes it. I added the repo and the first two implementation lines below to my build.gradle, and now all my tests are passing again. I assume that's not a safe combination of dependencies though. Guess I'll wait for 6.1.4 or—can I assume?—Spring Boot 3.2.3.
|
I would not recommend using snapshots for anything important. Spring Boot 3.2.3, to be released next month, will upgrade to Spring Framework 6.1.4. In the meantime, you may want to downgrade Spring Framework to 6.1.2 or even 6.1.1 (the latter to avoid being vulnerable to https://spring.io/security/cve-2024-22233/). |
Thanks @wilkinsona . A final question if you possibly have some time - given the build.gradle you see above, what is the best way to revert to Spring Framework 6.1.1? Do I just change to an older version of Spring Boot (in the plugins block, not shown), or, if I do it in dependencies, which of the |
The Gradle plugin documentation shows how to override managed dependency versions. In your case, you'd add something like this to your ext['spring-framework.version'] = '6.1.1`
It is generally safe to override the version of a managed Spring dependency to a different patch level (for example, from |
@scottfrederick thanks! |
My system compiles with zero warnings and all tests pass, under 3.2.1. But if I change just one character, ie
3.2.1
to3.2.2
in my build.gradle file, the system still compiles with no warnings but I get the following error running my tests:I've tried forcing spring-core and spring-web back to 6.1.2 in my dependencies section, but it makes no difference. I am not sure which part of Spring governs SpEL, but this looks like a bug to me.
Here is the class containing the SpEL in question:
Please bear in mind that this works perfectly with Spring Boot 3.2.1
The text was updated successfully, but these errors were encountered: