r/java • u/nfrankel • May 25 '22
Preparing for Spring Boot 3.0
https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-020
u/papers_ May 25 '22
We are currently waiting on the Apache CXF team to complete their Jakarta migration.
https://github.com/apache/cxf/pull/912
https://issues.apache.org/jira/browse/CXF-8371
But I think the real blocker for my team would be the other tools my company uses that may not yet be compatible with Java 17. Too much red tape to get things upgraded that is meant to serve the company as a whole.
9
7
14
u/uncont May 25 '22 edited May 25 '22
I'd also like to see the dependency on java.desktop removed as per https://github.com/spring-projects/spring-framework/issues/26884
As well as supplying module-info.java as a part of spring framework https://github.com/spring-projects/spring-framework/issues/18079
Spring is a huge player and I'd like to see them use their position to make change in the java ecosystem. If they threatened removal of dependencies that didn't have module-info.java files like how they removed those that didn't support jakarta, I'd imagine we'd see more libraries go modular.
2
u/lukaseder May 26 '22
I'd also like to see the dependency on java.desktop removed
That's probably there mainly because of that silly
@ConstructorPropertiesannotation, which is kinda useful on its own in a language that otherwise rejects supporting named parameters, yet it is almost impossible to extract from that module to the spaghetti inter dependencies of things in there, and the impossibility to create split packages, or rename things.1
u/vxab May 26 '22
Yes writing a modularised app and then getting errors like "reads from unnamed module" are not helpful to devs. Hopefully adding `module-info.java` files to Spring would fix that.
14
u/Kango_V May 25 '22
I think Spring is the new J2EE and the IBM of the software world. Remember the saying.... "Nobody ever got fired for buying IBM?". Spring Boot is the "safe" option, but is it the right one? Do companies ever look at anything else? My last two companies didn't. There are better alternatives imo.
18
u/GavinRayDev May 25 '22
Quarkus and Micronaut picking up a lot of traction.
When I first tried to write a JVM service, I googled "Java web frameworks" and walked through the Spring, Helidon, Quarkus, and Micronaut guides
Tryed to understand how to sign a JWT for "Bearer" auth and then check if a user has a role for an API endpoint in each framework.
Spring points to Spring Security docs, which have a diagram of the "Request lifecycle and filter chain" pipeline that goes through some dozen interfaces:
https://soshace.com/wp-content/uploads/2020/12/3_security_filter_chain-879.png
"Wow, so simple & intuitive!" (not)
Looked at the Quarkus and Micronaut docs, it was a ~100 line example that was very easy to follow for both of them.
Wound up picking Quarkus because I love Vert.x and Microprofile + open standards.
My assumption is that they'll continue to gain traction due to ease of use and great developer experience.
27
u/buffer_flush May 25 '22 edited May 25 '22
I have a lot of spring dev under my belt at this point, and trust me, I’m still confused by the oauth libraries spring provides.
Spring security and batch are probably the two projects in the ecosystem without great docs.
5
u/Soul_Shot May 26 '22 edited May 26 '22
I once wasted an entire afternoon trying to find out whether spring-security-oauth supported a specific flow that I needed. The answer ended up being something convoluted like it didn't, until a recent release, but then they deprecated that and rewrote everything with Reactor (which had a completely different API and no documentation).
0
May 25 '22
[deleted]
5
u/emaphis May 26 '22
One thing you might look at is JDK16+ has been stricter about accessing internal APIs.
85
u/[deleted] May 25 '22
Very happy to see more projects moving to Java 17 and the Jakarta namespace. A gentle push for the ecosystem to move past Java 8.