FreeMarker
一个模板引擎 即 FreeMarker
github https://github.com/apache/freemarker
网址 https://freemarker.apache.org/
maven安装
访问网址 https://search.maven.org/artifact/org.freemarker/freemarker/2.3.28/jar
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.28</version>
</dependency>
编写模板
<!DOCTYPE html>
<html lang="zh_CN">
<head>
</head>
<body>
hello world ${name}
</body>
</html>
编写配置文件
<result name="success" type="freemarker">
<param name="location">/hello.fm</param>
</result>
qrcode_for_gh_9901b36b3b0e_258.jpg
网友评论