r/java • • May 25 '22

Preparing for Spring Boot 3.0

https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0
224 Upvotes

29 comments sorted by

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.

16

u/BlueGoliath May 25 '22

Fun hypothetical question: if all vendors currently offering support for Java 8 were to stop supporting it, what would happen?

25

u/[deleted] May 25 '22 edited May 28 '22

You would drive development salaries even higher as firms race to rewrite old code.

:)

2

u/Fenor May 30 '22

so it's good

35

u/[deleted] May 25 '22

The same thing happened to Python not long ago with the transition from 2.7 to 3.x

Active projects will migrate and some of the abandoned projects will wither away

22

u/manzanita2 May 25 '22

It's a MUCH smaller jump than python 2.8 to 3.X.

12

u/john16384 May 25 '22

Some more feet dragging, and then a serious look at how to continue using the software with as little effort as possible, which is likely just upgrading.

12

u/[deleted] May 25 '22

Given how many legacy apps are still on Java 6... Sigh

3

u/lukaseder May 26 '22

Why would anyone stay on Java 6, yet upgrade complex libraries and frameworks? If an application stays on Java 6, they'll likely stay on all other versions, too, and are ready to pay for tailor made patches if needed.

2

u/[deleted] May 26 '22

I never said they would upgrade the libraries and frameworks. I'm just stating a fact that there's a lot of legacy apps out there still on Java 6, and there will likely be a bunch that stay stuck on Java 8 too

1

u/lukaseder May 26 '22

Ah right. I kinda read that implication into the conversation here, given that it was about Spring Boot 3.0 (upgrading to which will require upgarding all sorts of libraries).

1

u/mauganra_it May 27 '22

Outside of the companies that run them, almost nobody cares about these anymore. Nobody will let these affect their decisions. The same will eventually happen to Java 8. Probably not before 2030 though.

1

u/Muoniurn May 28 '22

Because there are many retarded companies that have some stupid ass “security” policy or some bullshit reason not to update the VM.

4

u/ryuzaki49 May 25 '22

Mass migration.

4

u/henk53 May 25 '22

Even more hypothetical: all vendors stopped supporting Java 8, and then a huge log4j type of security hole was discovered in 8. Would companies still refuse to update?

8

u/nossr50 May 25 '22

I wouldn’t put it past companies to run a “patched” JRE at that point

1

u/kozeljko May 25 '22

No change for us, sadly.

2

u/D_snooz May 26 '22

Java 8 did a lot of good, but it is time for companies to start migrating and Java 17 is a great place to start.

20

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

u/[deleted] May 25 '22

What happened to Spring native? Is it still gonna be in beta after Spring boot 3.0?

7

u/cogman10 May 25 '22

Wow this will be a kick in the pants for the ecosystem to move.

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 @ConstructorProperties annotation, 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

u/[deleted] 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.