Skip to end of banner
Go to start of banner

Spring Boot 3.0 Migration

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Current »

Migration to Spring Boot 3.0 is completed for below services

  1. File Management Service

  2. File Storage Service

  3. Transaction Storage Service

  4. Account Processor Service

  5. Reference Data Service

  6. Rule Service

  7. Data Transformation Service

  8. Transaction Origination Service

  9. Validation Service

  10. Member Management Service

  11. Transaction Manager Service

  12. Trading Partner Service

This confluence page details the steps to be taken to migrate a Spring Boot 2.x project to Sprint Boot 3.0

Step 1: Follow the steps provided below to first migrate the project to Spring Boot 2.7.x if the current project is in a version prior to 2.7.x. Skip this step if the project is already a Spring Boot 2.7.x project

pom.xml updates

  • Update the Spring boot parent version to 2.7.5

  • Update Zeus Library version to 1.0.70

  • Remove the mysql dependency

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <scope>runtime</scope>
</dependency>
  • Add the below dependency for mysql

<dependency>
  <groupId>com.mysql</groupId>
  <artifactId>mysql-connector-j</artifactId>
  <scope>runtime</scope>
</dependency>
  • Add the below dependency for flyway

<dependency>
    <groupId>org.flywaydb</groupId>
    <artifactId>flyway-mysql</artifactId>
</dependency>
  • The spring doc dependency should be the one the one below

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-ui</artifactId>
    <version>1.5.12</version>
</dependency>
  • Comment the below dependencies if it is uncommented

<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>8.0.0.Final</version>
</dependency>
<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>2.0.0</version>
</dependency>
  • Reload the maven project to get all the dependencies

  • Clean the project

  • Package the project to see if there are any errors

  • Start the service to ensure the project starts without any exceptions

  • Commit the code to github

Step 2: Follow the steps provided below to migrate the project from Spring Boot 2.7.x to Spring Boot 3.0.x

pom.xml updates

  • Update the Spring boot parent version to latest 3.0.x version

  • Update Zeus Library version to 1.0.80 (or the latest version)

  • Remove the below spring doc dependency

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-ui</artifactId>
    <version>1.5.12</version>
</dependency>
  • Add the below dependencies

<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>8.0.0.Final</version>
</dependency>
<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>2.0.0</version>
</dependency>
  • Reload the maven project (this may take some time)

  • Clean the project

  • Package the project and you should see exceptions for not able to find javax.persistence.* package

  • Replace javax.persistence package with jakarta.persistence package on all the files.

  • You may also see an error for the below code

@Type(type = "uuid-char")
  • Replace it with the below code

@JdbcTypeCode(Types.LONGVARCHAR)
  • Add the below property in application.xml

spring.flyway.clean-disabled=false
  • Clean the project

  • Package the project. If you have javax.validation.* package you will see exceptions for not able to find it.

  • Replace javax.persistence package with jakarta.validation package on all the files.

  • Clean the project

  • Package the project.

  • If the build was successful, run the service to check if it starts without any exceptions.

  • If application starts, commit the code to github.

  • No labels