The JVM level keep changed to the version that I don't want when building spring project

Gagak

I am currently in the need to create a Spring project with Java version 8. I have set Java to the version 8 and the JDK is 1.8. However, when I build it - I got this notification enter image description here

Which indeed turn my Java into 17 in my pom.xml . I tried to change the version from my pom and synced it but when I rebuild my project again I got this error enter image description here

Upgrading my java version to above 8 is not an option. How to fix this?

//edit: pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.0</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>demo</description>
    <properties>
        <java.version>8</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>
gkatiforis

Spring Boot 3.0.0 requires Java 17 and upwards to be compatible with the new features. If you really want to use Java 1.8 I would suggest downgrading the Spring Boot version to the previous stable version which is 2.7.6

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

In intellij idea 12, is there any settings can filter out files that I don't want to list in project view?

UIButton is transparent when I don't want it to be

Do I have to update project version when only README has changed on GitHub?

Linq to SQL Join Allowing Nulls When I don't want that

Page keeps refreshing when updating html in javascript when I don't want it to

View is caching its previous data when the view is reinvoked with a parameterless View() - when I don't want it to

Bash script, echo is wrapping when I don't want it to

EF Core loading relationships when I don't want it to

Keep getting an attribute error on my pygame project and I don't understand why

I don't want to keep the column that was used to create a data.table subset. How can I accomplish this?

Java is updating a variable when I don't want it to

FireFox seems to always cache forms when I don't want it to

ExecuteSqlCommand automatically calls SaveChanges() when I don't want it to

IntelliJ "Project level changed:

I want to keep a class changed by jquery across the pages

When I mouse over an image, I want it to keep enlarging until I don't have my mouse on it anymore

Regex group is matching quotes when I don't want it to

SelectList rendering with multiple = "multiple" when I don't want it to

I don't have previous signature certificate and I want to upload a latest version of my application in play store

Why Jquery renders as HTMLString when I don't want it?

Regex allows for repeating the pattern when I don't want it to

I don't want the code to work when delete button on the keyboard

Pygame mixer playing sounds when I don't want it to

IntelliJ keep showing "openjdk version "15.0.2" when I change the project language level to 8

I don't undersrand this opcode in JVM Implementation

I don't understand this opcode in JVM Implementation

How can I reset room db database schema if I don't want to increment the version?

Redux is re-rendering a component when I don't want it to

I want to use turborepo in a project where I don't use next.js. Is something like this possible?

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    pump.io port in URL

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  14. 14

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  15. 15

    How to use merge windows unallocated space into Ubuntu using GParted?

  16. 16

    flutter: dropdown item programmatically unselect problem

  17. 17

    Pandas - check if dataframe has negative value in any column

  18. 18

    Nuget add packages gives access denied errors

  19. 19

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  20. 20

    Generate random UUIDv4 with Elm

  21. 21

    Client secret not provided in request error with Keycloak

HotTag

Archive