Created
July 16, 2012 14:09
-
-
Save wataru420/3122922 to your computer and use it in GitHub Desktop.
SpringFreemarkerMacro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#import "/spring.ftl" as spring /> | |
<a href="<@spring.url '/userUrl'/>">ユーザ</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> | |
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> | |
<spring:url value="user" var="userUrl" /> | |
<a href="${fn:escapeXml(userUrl)}">ユーザ</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"> | |
<property name="cache" value="true"/> | |
<property name="prefix" value=""/> | |
<property name="suffix" value=".ftl"/> | |
<!-- この行を追加してtrueにしておくとSpringFreemarkerMacroが有効になります。 --> | |
<property name="exposeSpringMacroHelpers" value="true"/> | |
</bean> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment