diff --git a/README.md b/README.md index 7ea2d15..d3fcd80 100644 --- a/README.md +++ b/README.md @@ -1,141 +1,2 @@ -[mustache.java](https://github.com/spullara/mustache.java) view for [spring3](http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html) ---------------------------- -What is mustache: [mustache.js](http://mustache.github.com/mustache.5.html) - -This is a version of [mustache-spring-view](https://github.com/sps/mustache-spring-view) that - works with [mustache.java](https://github.com/spullara/mustache.java). - -Big thanks to sps (Sean Scanlon) for mustache-spring-view, which supports -jmustache. This code base is derived from mustache-spring-view. - -Getting Started ------------------ -See: http://blog.springsource.com/2011/01/04/green-beans-getting-started-with-spring-mvc/ - -And the following sections - -Maven dependency ------------------ - - - - ... - - com.github.ericdwhite - mustache.java-spring-webmvc - 0.9.3-SNAPSHOT - - ... - - - - ... - - Sonatype Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - - ... - - -Spring configuration -------------- - - - - - - - - - - -Example -------------- -WEB-INF/views/parent.html - - - - Home - - -

Hello world!

-

{{ token }}

- - - {{> footer }} - - - -WEB-INF/views/footer.html - -
-

Copyright (C) 2012, Example Inc.

-
- -A Controller -------------- - - @Controller - public class HelloWorldController { - - @RequestMapping(value="/hello") - public String hello(Model m) { - m.addAttribute("token", new java.util.Date()); - return "parent"; - } - } - - -Mustache and Localization -------------- -If you want to use mustache in a localized application, you can use the MustacheMessageInterceptor. -Configure your application for localization. -See also for more background: http://viralpatel.net/blogs/2010/07/spring-3-mvc-internationalization-i18n-localization-tutorial-example.html - -Create resource bundle e.g. -* messages_en.properties - > labels.global.mustache=moustache -* messages_nl.properties - > labels.global.mustache=snor -* ... - -Spring configuration for localization: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -In your mustache template, do: - - {{#i18n}}labels.global.mustache{{/i18n}} - -Will be replaced by (if your locale has language 'en'): - - moustache - - - - +This has been merged with [mustache.java-spring-webmvc](https://github.com/sps/mustache.java-spring-webmvc) +----------------------------------------------------------------------------------------------------------------