Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need Spring 5 for Java 9?

Spring 5 is promoted as "with support for JDK 9", meanwhile the documentation for Spring 4.3.13 states that it supports Java 8 (as well as 6 and 7).

Does this mean that I need to upgrade to Spring 5 before I can

  • run my application in JRE 9?
  • compile my application using JDK 9?
like image 267
David Avatar asked Nov 02 '17 16:11

David


1 Answers

Spring

On the official Spring blog, they announced that Spring 4.2 would support Java 7 and 8 (it didn't change in 4.3), and they also said that Spring 5 would support Java 9.

It is implied that Spring 4 won't support Java 9.

But it depends of what you're doing: on this blog, the writer is testing Java9 on Spring 4 and he said:

However, before we begin, a quick disclaimer: I will be demonstrating migrating Spring 4.x/Spring Boot 1.x applications to Java 9. As far as I have heard, there will be little to no formal support for either in Java 9. So far, I haven’t run into many issues once I have gotten the applications running, however, as these are primarily proofs of concept, they have not been thoroughly vetted.

Because "doesn't support" only means you're not sure of the comportment, If you're using anything that changed in Java9, you should consider migrating (unless you can test it first).


Spring Boot

Spring boot 1.x does not support Java9. If you want to use it, you have to migrate to Spring Boot 2.x.

like image 189
Turtle Avatar answered Sep 30 '22 19:09

Turtle