Does Spring 3.0.x support Java 8? In Spring Starter I found sourceCompatibility = '17' default for 3.0.x and above

4.6k views Asked by At

I was trying to create a Spring Boot 3.0.5 application, along with Java 8 in Spring Starter. Screenshot shared below

Spring Starter page

Post which I checked the Explore button which helps in identifying what code will look like.

However, I found

sourceCompatibility = '17'

I did not expect that as I had selected Java 8 in above screen. Am I missing something here?

Explore window

3

There are 3 answers

0
M. Deinum On BEST ANSWER

No it doesn't. As Spring Boot 3 requires Java 17 or up (as clearly stated in the documentation).

0
JP Park On

Spring boot 3 is required Java 17.
You have to use Java 17 if you are going to do with Spring boot 3.

0
HaRi On

Spring Boot 3.X requires Java 17 as a minimum version. To use Java 8, you’ll need to use Spring Boot 2.X version.

Try this version 2.7.18.

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.18</version>
    <relativePath/>
</parent>