我正在寻找一种方法来定义两个模板解析器,可以在spring boot应用程序中用于百万美元的邮件处理.我需要这个,因为我有一个html模板和一个文本模板.两者都是在电子邮件中提供富文本和纯文本内容所必需的.
所有配置都应在application.properties中或通过环境属性完成.
我只设法定义了一个模板解析器:
spring.thymeleaf.check-template-location=true
spring.thymeleaf.prefix=classpath:/mails/
spring.thymeleaf.excluded-view-names=
spring.thymeleaf.view-names=
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=HTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
spring.thymeleaf.cache=true
Run Code Online (Sandbox Code Playgroud)
如果有人能给我一个提示或向我展示寻找解决方案的正确方向,我会很高兴.