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>
原文地址:https://www.cnblogs.com/melovemingming/p/10597411.html
时间: 2024-11-15 00:51:57