Spring Boot 1.4.x の Web アプリを 1.5.x へバージョンアップする ( その4 )( 1.4系 → 1.5系で変更された点を修正する )
概要
記事一覧はこちらです。
- 今回の手順で確認できるのは以下の内容です。
- Release Notes を見て 1.4系 → 1.5系で変更された点を修正します。
参照したサイト・書籍
Spring Boot 1.5 Release Notes
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.5-Release-NotesSpring Boot 1.5の主な変更点
http://qiita.com/kazuki43zoo/items/c26d99bb57888e42eaf1
目次
手順
Devtools excluded by default
spring-boot-devtools
がデフォルトで fat jar から除外されるようになりました。
1.4 系の時のソースに切り戻した後、build.gradle の bootRepackage の中の excludeDevtools = true
をコメントアウトして jar ファイルを生成してみます。
bootRepackage { mainClass = 'ksbysample.webapp.lending.Application' // excludeDevtools = true }
生成された ksbysample-webapp-lending-1.4.6-RELEASE.jar を解凍すると、BOOT-INF\lib の下に spring-boot-devtools-1.4.6.RELEASE.jar が入っています。
excludeDevtools = true
のコメントアウトを元に戻すと、spring-boot-devtools-1.4.6.RELEASE.jar は入りません。
feature/130-issue ブランチに戻して build.gradle から excludeDevtools = true
を削除して jar ファイルを生成してみます。
bootRepackage {
mainClass = 'ksbysample.webapp.lending.Application'
}
生成された ksbysample-webapp-lending-1.5.3-RELEASE.jar を解凍すると spring-boot-devtools-1.5.3.RELEASE.jar は入っていませんでした。
次回は。。。
1.5 では特にソースの変更が必要なところはありませんでした。次回は Thymeleaf を 3系へバージョンアップします。
ソースコード
履歴
2017/05/20
初版発行。