'Spring core upgrade from 5.2.8 to 5.2.20

Could you please share the detailed steps to upgrade spring core from version 5.2.8 to 5.2.20 .

Spring core version is 5.2.8 as per the jar file, however in pom.xml, I don't see the version as 5.2.8.

Here is the pom.xml file. Could you please suggest what need to be done to upgrade it to version 5.2.20.

pom.xml file

4.0.0 org.springframework.boot spring-boot-starter-parent 2.3.2.RELEASE com.example rest-service 0.0.1-SNAPSHOT rest-service Demo project for Spring Boot

<properties>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

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


Solution 1:[1]

The spring-boot-starter-parent at the top of your pom file manages the spring framework version. Change the version from 2.3.2.RELEASE to 2.3.12.RELEASE and the spring framework version will change to 5.2.15. You can use maven tools, including the dependency hierarchy in eclipse, to see how that works.

In your properties section, add this temporarily:

<spring-framework.version>5.2.20.RELEASE</spring-framework.version>

Check the spring boot wiki for the release notes for upgrading versions. When you are on a supported version then remove the spring-framework.version property.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 James S