Migrating a Legacy Spring Application to Spring Boot 2

Out with the old, in with Spring Boot 2

Recently, we decided to monitor the metrics of legacy Spring applications we were running on our production systems. While searching around, I realized that a nice way to not reinvent the wheel was to integrate my app with the Spring Boot Actuator. By using the actuator, we have many tools like Grafana and Prometheus for easily monitoring our applications. However, in order to integrate such a legacy Spring application with the Spring Boot Actuator, you need to make it Spring-Boot-ready first.

You may also like:  How to Deal With Legacy Code

Since Spring Boot 1.5 reached the end of its life at the beginning of August, I decided to move to Spring Boot 2 and start playing with it.

Spring Boot Migration From 1.5 to 2.0.5

Thinking of upgrading your Spring Boot application? In this post, I’d like to walk you through the process of upgrading a Spring Boot 1.x app to Spring Boot 2.

Dependencies

Java

Spring Boot 2.x will no longer support Java 7 and below, with Java 8 as the minimum requirement.