Santosh Pashupati
Santosh Pashupati

Reputation: 519

Moving away from Spring(1.2.7) legacy application

I am currently working on Spring legacy application which is using spring 1.2.7.

<!-- https://mvnrepository.com/artifact/org.springframework/spring -->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring</artifactId>
    <version>1.2.7</version>
</dependency>

But the above artifact "spring" has been discontinued after 2.5.6. On the maven site , it has been suggested to use spring-core arifact as replacement. But on changing it , I am getting compilation error. Also when I compared the size , spring artifact had 2mb and spring-core has 200kb. So definately spring was divided into multiple jars. Can anyone please help me how will I get the documentation for this.

Upvotes: 0

Views: 195

Answers (2)

M. Deinum
M. Deinum

Reputation: 124441

  1. Move to the latest version of the version you use, which would be 1.2.8.
  2. Move to the next major version 2.0.7, then 2.5.6.SEC03, 3.0.6.RELEASE etc.
  3. Each time you change the major version make sure the application still works.
  4. Continue until you are at the version you want to use.

To get information on what has changed check the reference guide and the migration guide (there are several for 3.x, 4.x and 5.x). Ofcourse for the version you are upgrading to/from.

NOTE: Replace the version in the URL with the version you are migrating to for that specific reference guide!

NOTE: There are migration guides for 3.x, 4.x and 5.x. These assume that you want to go from 2.5 -> 3.x, 3.x - 4.x etc.

The reference guide from 2.5 contains quite detailed information on what modules there are. This wiki page has information about (newer) available modules.

Upvotes: 2

TheOddCoder
TheOddCoder

Reputation: 161

I don't know if that helps but maybe you can just create the new spring dependencies based on https://start.spring.io/ and their initializr. With that you can select which functionalities of spring you want to use and it generates a small project for you where you can copy paste the pom.xml from. Most likely it will be a big change because upgrading to a new version always takes a lot of time and of course brings most likely a lot of changes to imports as well as classes and functionalities. Therefore as different option i would do what @M.Deinum suggested and migrating step by step to each version so you can keep at. This might be also easier to review for others but is most likely really time consuming.

Upvotes: 0

Related Questions