はじめに ソフトバンクのARM買収報道にびっくりな今日この頃、皆様いかがお過ごしですか。 Spring Boot のテンプレートエンジンと言えば thymeleaf が筆頭に挙げられますが、これをメール用のテンプレートエンジンとして利用するための方法に関して書きます。 Webアプリケーションではなく、Spring Batch アプリケーションから利用する方法になります。 ※ビルドツールとして Maven を利用する方向で説明します。 ※STS (Spring Tool Suite) を利用して Spring Boot プロジェクトを作成している前提です。 Maven ( pom.xml ) の設定 pom.xml を作成します ( 以下 )。 Spring Boot の batch, mail, thymeleaf を dependency 設定しています。 <?xml version="
![Thymeleafをメールテンプレートとして使う : アジャイル株式会社](https://cdn-ak-scissors.b.st-hatena.com/image/square/30496ee9d5080d24b109b3b4fb4094e89e6aa53c/height=288;version=1;width=512/http%3A%2F%2Fwww.agilegroup.co.jp%2F.imaging%2Fstk%2Fagilegroup01%2Fgallery-zoom%2Fdam%2Fagilegroup%2Fimg%2Fbk%2Fstage%2Fthymeleaf-mail-template%2Fjcr%3Acontent%2Fthymeleaf-mail-template.jpg.jpg)