<#assign path="${request.getContextPath()}">
<base href="${path}/">
注意:
1.<#assign>path中request是application配置文件中定義的 spring.freemarker.request-context-attribute 。
2.<base>標籤href一定要以反斜槓“/”結尾,代表目錄,否則無效。
<#assign path="${request.getContextPath()}">
<base href="${path}/">
注意:
1.<#assign>path中request是application配置文件中定義的 spring.freemarker.request-context-attribute 。
2.<base>標籤href一定要以反斜槓“/”結尾,代表目錄,否則無效。