かんがるーさんの日記

最近自分が興味をもったものを調べた時の手順等を書いています。今は Spring Boot をいじっています。

Spring Boot 1.5.x の Web アプリを 2.0.x へバージョンアップする ( その1 )( 概要 )

概要

記事一覧はこちらです。

  • 「Spring Boot で書籍の貸出状況確認・貸出申請する Web アプリケーションを作る」で作成した Web アプリケーション ( ksbysample-webapp-lending ) の Spring Boot のバージョンを 1.5.4 → 2.0.8 へバージョンアップします。
  • 進め方は以下の方針とします。
    • Git のブランチは 2.0.x を作成して、そちらで作業します。Spring Boot のバージョンと合わせます。
    • 最初に Gradle のバージョンを 3.5 → 4.x へバージョンアップします。
    • 次に Spring Boot のバージョン番号を 2.0.8 にします。
      • Spring Initializr で 2.0.x のプロジェクトを作成して、修正した方がよさそうな点があれば反映します。
      • Spring IO Platform は 9 April 2019 に EOL を迎えるので、Spring Boot の BOM を利用するように変更します。
      • ライブラリは最新バージョンにアップデートします。
      • build.gradle の記述についても、プラグインの書き方を apply plugin: ... から plugins block に変更したり、それ意外にも build.gradle の書き方で変更した方が良い点を変更します。
    • プロジェクトを build し直してエラーが出る点があれば修正し、まずはここまでで動くようにします。
    • その後で 2.0 系ではこう書くべきという点があるか確認し、変更した方がよいところを修正します。
    • 以下の対応もする予定です。
      • Tomcat connection Pool → HikariCP に変更します。
      • FindBugs → SpotBugs に変更します。
      • Spring Boot Actuator を導入します。
      • Redis, RabbitMQ を Docker に切り替えます。

 
2.0 の Release Notes、Migration Guide はこちらです。

Spring Boot 2.0 Release Notes
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes

Spring Boot 2.0 Migration Guide
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide

履歴

2018/08/29
初版発行。
2018/10/16
* Spring Boot 2.0 Migration Guide のリンクを追加しました。
2019/02/06
* Spring Boot のバージョンアップ後のバージョンを 2.0.4 → 2.0.8 に修正しました。