1. 程式人生 > >springboot + mail +thymeleaf

springboot + mail +thymeleaf

最近專案中需要使用到傳送郵件功能不高興使用freemarker了,就採用thymeleaf簡單處理

直接貼出程式碼了

gradle 中的配置檔案

別忘了在application.properties 中配置thymleaf 資訊

使用程式碼



在貼出html模板中的程式碼
接受的資料格式是
List<Map<String,Object>>