本文链接:https://blog.csdn.net/qq_39940205/article/details/79738931
.Java的设置方法:
/**
*@author name
*@date ${DATE} ${TIME}
*/
.jsp的设置方法:
<%--
Created by IntelliJ IDEA.
User: name
Date: ${DATE}
Time: ${TIME}
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<base href="<%=basePath%>">
<title>#[[$Title$]]#</title>
</head>
<body>
#[[$END$]]#
</body>
</html>