知乎专栏 |
src/main/resources/application.properties
spring.velocity.resourceLoaderPath=classpath:/templates/ spring.velocity.prefix= spring.velocity.suffix=.vm spring.velocity.cache=false spring.velocity.check-template-location=true spring.velocity.content-type=text/html spring.velocity.charset=UTF-8 spring.velocity.properties.input.encoding=UTF-8 spring.velocity.properties.output.encoding=UTF-8
src/main/resources/templates/email.vm
<html> <body> <h3>${title}!</h3> <p>${body}</p> </body> </html>