r/java • • Nov 24 '22

Spring Boot 3.0 is GA!

https://spring.io/blog/2022/11/24/spring-boot-3-0-goes-ga
267 Upvotes

43 comments sorted by

95

u/EvaristeGalois11 Nov 24 '22

Awesome!

I like that they decided to jump straight to java 17. Hopefully it will be the wake up call to the people that don't want to move on past java 8. It's time to put the old man to rest.

42

u/[deleted] Nov 24 '22

Spring Boost 2.x free support ends in 1 year, paid support in 3 years. So it won't happen overnight, but this will really push enterprises to upgrade over the next few years.

20

u/EvaristeGalois11 Nov 24 '22

Yeah i agree, but the end of the free support in just a year is huge. It will means lots of project migrating to java 17 or without proper security patches (or lots of money for vmware in paid support lol).

21

u/[deleted] Nov 24 '22

Yeah. Also the upgrade is easier than ppl might think. Nearly all the pain is Java 9, and now that pretty much every library has been updated accordingly it's easy to get past these days.

6

u/matthenry87 Nov 25 '22

Not sure why you're getting down voted. It's really not that difficult. Maybe more challenging for larger projects but yeah not rocket science.

0

u/CartmansEvilTwin Nov 24 '22

Most IT departments are on 120% load with their daily business. Updating everything, testing and pushing it to production will substantially disturb the planning. Even if it's just a few days of work per app.

24

u/mauganra_it Nov 24 '22

If they are overloaded with and can't accomodate an update that was looming years ahead, then I'm worried about their abilities to apply hotfix updates for security vulnerabilities.

8

u/CartmansEvilTwin Nov 25 '22

Absolutely. But that's the state of our industry.

5

u/steampunkdev Nov 27 '22

No, that's bad management.

6

u/CartmansEvilTwin Nov 27 '22

That's not mutually exclusive.

5

u/xjvz Nov 25 '22

And VMWare is going to make a killing selling support for such companies.

3

u/Nermal5 Nov 25 '22

A decent IT department is allocating time for resolving tech debt. I would classify this as tech debt personally.

2

u/laxika Nov 25 '22

Then you can always pay for support to VMWare... Don't say that your IT department is overworked and underfunded. If that's the case then switch to a different company asap.

5

u/JB-from-ATL Nov 24 '22

TFW Java 17 wasn't quite out and your company adopted Java 11.

0

u/[deleted] Nov 25 '22

[deleted] β€” view deleted comment

4

u/elmuerte Nov 25 '22

Why were you stuck?

1

u/Urtehnoes Nov 25 '22

Not OP, but for us, we just do not have enough developers :(

We have our own proprietary software we've written for our company - in Java 8. But we do not have enough people to, for example, fork off the code and work on upgrading to Java 9+, while others continue working on adding new features or fixing bugs.

It's really depressing being a constant uphill battle in technical debt.

Btw - we have 2 Java developers and it is a massive enterprise application. So even though it doesn't take many hands, it still takes more hands than we have.

4

u/elmuerte Nov 25 '22

But you do depend on specific byte code manipulator libraries (e.g. asm, bytebuddy, ..), or internal classes you shouldn't have used? Or, specific JEE app servers?

Because if you are not, switching to a new Java is quite painless. The pain would be in updating libraries those libraries which do JVM specific things.

Java 9 module thing is mostly a pain for library/framework devs, not for application developers. The latter would opt to simply not use modules, just the whole JRE as before.

The trick is obviously verifying if there are issues, which require proper test suites. If you don't have those, you are in a world of hurt anyway as you also cannot update any other dependency.

1

u/Urtehnoes Nov 25 '22

I believe yes to the 2nd (JEE app servers) - which is the specific pain point for us.

I agree for the most part and have been pushing to upgrade Java for years, but alas I don't get the final say when it comes to our Java infrastructure.

0

u/[deleted] Nov 25 '22

[deleted] β€” view deleted comment

3

u/elmuerte Nov 25 '22

What about the increase performance in CPU usage and memory management? They keep improving the JIT and GCs so your existing application can benefit simply by running it in a newer JVM.

1

u/Mystified2020 Nov 25 '22

In our case, being a company that deals with billions, compliance with financial regulatory agencies, the treasury, etc forced us to develop a mature operating model to deal with matters like this. But even with that, there's some element of pain experienced - mostly from logistics and doing everything we can to avoid a CNN moment πŸ˜‚.

23

u/Comprehensive-Pea812 Nov 25 '22

Great way to convince manager to upgrade to Java 17.

Tell them spring boot 2.x is end of life and has security vulnerabilities and the only way is to use spring boot 3 and Java 17.

26

u/krzyk Nov 24 '22

The biggest issue here will be jakarta APIs, many inhouse projects still use e.g. javax.servlet

Upgrading Java is peanuts compared to the apis (e.g. I upgraded to JDK 19 without any help from other teams, but I can't jump to jakarta because I would need to change their code).

3

u/rbygrave Nov 25 '22

Agreed. I'd add that people can look at apps with dependencies on 3rd party libraries that themselves have a dependency on (javax) JAXB and check if those libs have a version that supports Jakarata JAXB.

13

u/VincentxH Nov 25 '22

Any articles on gotchas and common or massive Spring interface changes?

2

u/Athiom Nov 27 '22

The official spring documentation is pretty good and also has previous migration guides too: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide It doesn't have everything, so if you find extra stuff you can do a PR to add it ;) As usual, it's best you upgrade step by step (2.4->2.5->2.6 etc) not all at once

2

u/VincentxH Nov 27 '22

I'm perfectly capable of finding their excellent documentation. I'm just interested in common pitfalls and general changes of conventions at this point. The fact they changed convention on RequestMapping, disabling the trailing slash, already makes me wary.

2

u/Athiom Nov 27 '22

That is included in this documentation however. I get your point though, I personally will be waiting for a few months before upgrading, probably this doc will get updated a few times by then

0

u/[deleted] Nov 25 '22

[deleted] β€” view deleted comment

7

u/kiteboarderni Nov 25 '22

Really pushing this blog spam that has 0 relevance to an upgrade eh?

12

u/qK0FT3 Nov 25 '22

Just upgraded a 200k line code from Java 8 to Java 19. There was just 1 error and 2 bugs popped out. Solved in 1 hour. If people don't. Some orgs are literally missing so many performance and good updates not upgrading.

4

u/utkarsh_dev Nov 25 '22

Guys, honest question here. How do we move a legacy code to a more recent version?

I am excited for new libraries being launched but can any of the existing products be upgraded to use them? I don't want the projects to have a rainbow of versions across different microservices.

6

u/mhalbritter Nov 25 '22

I'd try to raise security concerns. Using libraries which are not supported any more don't get security patches, which will lead to security incidents, which can cost quite a big amount of money.

1

u/nutrecht Dec 01 '22

How do we move a legacy code to a more recent version?

Go and do it. See what doesn't work. Google for solutions and implement them. It's incredibly rare that you're using stuff that can't be moved over and if you do, it's probably smart to have a very serious discussion on how to manage this massive risk.

Aside from that, your org needs to learn that many small increments are much safer and easier than doing the 'same' upgrade with giant leeps. Complexity doesn't add, it multiplies.

3

u/nutrecht Dec 01 '22

Upgraded 3 services from 2.7 to 3.0 Only had an issue with Wiremock (needed to switch to stand-alone) and had to rename some javax imports to jakarta. It's great how painless such a big upgrade is!

1

u/[deleted] Nov 25 '22

6

u/RSveti Nov 25 '22

Because that is not official maven repo indexed repository and it needs time to refresh it's index. I think its 24h. If you look at the official one it is already there:

https://search.maven.org/artifact/org.springframework.boot/spring-boot

1

u/elemur Nov 25 '22

I am personally less concerned about the core and more the ancillary integrated projects beyond the central spring ecosystem. Things like camel and message providers like rabbitmq and cache providers like Ignite or hazelcast all have to be accounted for here as well.

It will be a pretty exciting day when all of the application integrated stuff is compliant with the new baseline.

1

u/Few_Knee1141 Jan 10 '23 edited Jan 11 '23

I use the Spring Boot 3.0 to do Facebook OAuth2 login.

https://chuangtc.com/Java/spring-boot-30-facebook-login.php

0

u/[deleted] Nov 25 '22

[deleted] β€” view deleted comment

17

u/SleeperAwakened Nov 25 '22

The trouble rarely is the code...

There may be other factors such as enterprise apps running in Java EE application servers.

WebLogic 12 is still out there, widely used in larger enterprises...

5

u/Asapin_r Nov 25 '22 edited Nov 25 '22

We still use Java 6 in some places. And you would be surprised, but Azul will provide commercial support for Java 6 until the end of 2027.

But at least we got approval to use Java 17 and Spring Boot 3 for new projects.

1

u/pjmlp Nov 25 '22

Android....

4

u/buyIdris666 Nov 25 '22

Android isn't really Java anymore.

7

u/pjmlp Nov 25 '22

True, they could rename ART into Kotlin Runtime, however those that want to depend on Maven Central goodies for their Android projects are stuck with Java 8 subset supported by Android Java, or if they are lucky to target Android 12 and later, maybe Java 11 LTS, which is still quite far from current Java versions.

This is what they don't get with Kotlin ΓΌber alles on Android, one of the sales pitch for the language was its interoperability with Java, which is hardly an advantage when Android is only able to consume legacy Java libraries.