-
Notifications
You must be signed in to change notification settings - Fork 256
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
[WIP] update to »SpringBoot 3« (w/ Spring Framework 6) #1375
Conversation
Let this PR start the discussion to update Logbook for SpringBoot 3 (requires JakartaEE 10). |
Maybe introducing new modules dedicated to Jakarta and Spring 6/Spring Boot 3 will be a better approach? The old modules will still work, and we will have Spring 6 support. |
@marcindabrowski that's fine. So these new modules I can think of:
|
It looks great. |
Jakarta Servlet 6 requires at least Java 11 which should not be a problem. |
@marcindabrowski, I have created the new three modules and updated the GitHub workflow. The The auto configuration for SpringBoot v3 handles Unfortunately, the Dependency Check complains some CVE affected dependencies. To execute the tests, the Dependency Check is temporarily disabled. |
@@ -0,0 +1 @@ | |||
org.springframework.boot.autoconfigure.EnableAutoConfiguration = org.zalando.logbook.autoconfigure.LogbookAutoConfiguration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this won't work in SpringBoot 3. We need META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
. See https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M5-Release-Notes#auto-configuration-registration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
import static org.zalando.logbook.autoconfigure.LogbookAutoConfiguration.ServletFilterConfiguration.newFilter; | ||
|
||
@API(status = STABLE) | ||
@Configuration(proxyBeanMethods = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and @AutoConfigureAfter
should be replaced with @AutoConfiguration(after = { JacksonAutoConfiguration.class, WebMvcAutoConfiguration.class } )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Also had to skip Spring Boot 1 tests, because ErrorMvcAutoConfiguration is not present in Spring Boot 1. |
Thank you @agebhar1. I'll try to look into that soon, though I'm no maintainer here. Honestly it feels like the project is kind of abandoned. My judgment is based on my feature PR being opened without comment for almost a year now. At worst case we would need a fork to be able to use Spring Boot 3 soon. 🤷♂️ |
Sorry for the late response. I used to be the maintainer of this project, but I've left Zalando 2.5+ years ago. Maybe @otrosien can chime in here. @otrosien Maybe there is a chance to move the whole project out of Zalando's Github org and Maven's groupId into its own separate space? |
If someone would be willing to create a (non-compatible) fork, I'd definitely be willing to participate there. |
@whiskeysierra, @phejl I'll be willing to be one of the maintainer if there will be a fork. |
Thanks @whiskeysierra, I appreciate it. |
Thank you @agebhar1 @whiskeysierra! How can I help at the moment? |
@agebhar1 Can you navigate me to "Also had to skip Spring Boot 1 tests"? I would like to check that, but I'm blind :) |
@phejl the tests for Spring 4 (it's a profile in the Project pom) are skipped. Spring Boot's 1 dependency was Spring Framework 4. The commercial support for Spring Boot 1 ended over two years ago. |
@agebhar1 I would suggest these changes (attached). It is mostly about reducing dependenices. Otherwise lot of baggage would be pulled to the user of the library. This branch works great in my project. |
@phejl I'v applied your patch |
HI i was reviewing the code, superficially on github, and wanted to encourage you to not create a dedicated spring boot 3 starter, preferring instead to try to make it so that one configuration class could handle both frameworks. spring boot 2 autoconfiguration can be written in such a way that they're compatible with spring boot 3. the major thing is you'll need to add that you're going to experience binary incompatibilities with jakarta ee vs java ee, but this isn't a dimension of your spring support so much as the core libraries. could you link to both, as optional dependencies, and guard your bean registrations with
this way, to the extent possible, things just work for new users and old. where you might want to have a new module, otoh, is in supporting the Spring AOT engine. Spring's AOT engine provides a powerful way to furnish the metadata required for GraalVM native image compilation. There is no equivalent in Spring Boot 2; you need Spring Boot 3, which in turn requires Java 17. So perhaps you could create a |
@joshlong Thanks for the details! This project will either be transferred or forked (tbd) which will not just change the github org, but also the maven coordinates and the top level package name. |
Sounds good to me! Let me know if I may of service post restructuring. |
up ? |
Hi. Is there any progress on this? 🙂 |
See the discussion #1379 about 'The future of Logbook'. |
Hi All, please prioritize merging this PR. This is the only thing that is not working after I upgraded to Spring Boot 3. Request and response logging is a big deal for me and so please get this resolved as soon as you all can. Thanks @agebhar1 for doing this. |
Hello, is there any update about this ? |
@grassehh more information here: #1379 (reply in thread) As @leviferreira said, there should be updates incoming this week. |
There is again activity in this project, thank you! @leviferreira or @kasmarian can any of you share the plans supporting Spring Boot 3? As the comments show, this is currently a blocker for many. Will Logbook support it? If yes, when do you think we can expect it? |
Hi everyone, hi @hemju, we definitely aim to support Spring Boot 3, bear with us, and apologies for all these delays. If you have thoughts on this please share. |
@kasmarian thanks for the quick update!
My position on this is if the downward compatibility doesn't block new development or creates much more maintenance costs, then it is ok, otherwise, I would create a new breaking version. So it also depends on what the plans are for logbook. Do you plan many new features/additions in the future? That may cause a lot of additional work if the new features have to support two different Spring versions. Especially with new Spring versions popping up at a faster pace (https://www.youtube.com/watch?v=mitWK_DwKGs). Personally, I never understood why everything needs to be 100 % downward compatible in Java. I don't see the downside in an old version that supports the old Spring Boot 2 version and is in maintenance mode. And a new breaking version that supports the new Spring Boot. Obviously, that is a subjective view, but I also see a change in the Java ecosystem toward breaking versions and faster updates in recent years (JDK releases, Springs new release schedule). |
I tend to agree, depending on what we collectively understand as maintenance mode. Maintaining both Spring Boot 1.x and 2.x compatibility has been a pain in the recent years of Logbook. |
I also agree that you should release a new version that will support only Spring 6. But at the same time, it would be great if you can upgrade your dependent libraries to newer versions which also can have breaking changes. I'm aware that it will take more time, but I can't imagine upgrading only Spring and leaving other libs unchanged. But for most people Spring dependency is the most important so maybe you should consider releasing it as first as the Release Candidate version? |
And it would be nice to make it compliant with at least Java 11 instead of Java 8, but probably Java 17 would be the best option. |
It has to be 17 for Spring 6.
…On Fri, 10 Feb 2023, 17:53 Marcin Dąbrowski, ***@***.***> wrote:
And it would be nice to make it compliant with at least Java 11 instead of
Java 8, but probably Java 17 would be the best option.
—
Reply to this email directly, view it on GitHub
<#1375 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADI7HI47LYHSVX3JMHEBXDWWZW7XANCNFSM6AAAAAASCQLVCM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Any estimate on when this will be solved? |
I also wanted to ask that. I see that there are nearly daily commits (thank you for that), but many of the community are waiting on Spring Boot 3 compatibility. Can you please give us an estimate or let us know if there are some blockers? We would gladly help (e.g. test it). |
I've built a snapshot of the latest commit and tested it with my Boot 3 app, works pretty decent.
|
done with #1467 |
Description
Motivation and Context
Types of changes
Checklist:
Closes gh-1344.