r/java • u/spamthemoez • Nov 24 '22
Spring Boot 3.0 is GA!
https://spring.io/blog/2022/11/24/spring-boot-3-0-goes-ga23
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
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
Nov 25 '22
Why can't I see it here? https://mvnrepository.com/artifact/org.springframework.boot/spring-boot
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
0
Nov 25 '22
[deleted]
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.
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.