Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
java spring framework view for Mustache.js templates
Java
branch: master

This branch is 4 commits ahead, 48 commits behind sps:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src support {{>}} poorly
.gitignore
README.md support {{>}} poorly
pom.xml

README.md

mustache.js view for spring3

maven dependency

<dependency>
    <groupId>com.github.sps.mustache</groupId>
    <artifactId>mustache-spring-view</artifactId>
    <version>1.0</version>
</dependency>

spring config

<bean id="viewResolver" class="org.springframework.web.servlet.view.mustache.MustacheViewResolver">
    <property name="cache" value="${TEMPLATE_CACHE_ENABLED}" />
    <!-- do not throw exception when encouter null-->
    <property name="nullValue" value=""/>
    <property name="prefix" value="" />
    <property name="suffix" value=".html" />
    <property name="templateLoader">
        <property name="templateLoader">
            <bean class="org.springframework.web.servlet.view.mustache.MustacheTemplateLoader">
                <!--encoding of template-->
                <property name="encoding" value="utf-8"/>
            </bean>
        </property>
    </property>
    <property name="contentType">
        <!-- same with encoding of template-->
        <value>text/html; charset=utf-8</value>
    </property>
</bean>

problem

support {{> }} grammar poorly , need full path , eg :

{{> /WEB-INF/mustache/header.htm}} {{> /WEB-INF/mustache/following_footer.htm}}

Something went wrong with that request. Please try again.