diff --git a/README.md b/README.md index 03899e9..a258494 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,40 @@ spring-rythm ============ Enable SpringFramework application developer to use Rythm template engine + + +Maven dependency +---------------- + + org.rythmengine + spring-rythm + 1.0 + + + +Example Configuration +--------------------- + + @SpringBootApplication + public class DemoApplication { + @Bean + public RythmConfigurer rythmConfigurer(){ + RythmConfigurer rythmConfigurer = new RythmConfigurer(); + rythmConfigurer.setResourceLoaderPath("/templates"); + rythmConfigurer.setDevMode(true); + return rythmConfigurer; + } + + @Bean + public RythmViewResolver rythmViewResolver() { + RythmViewResolver viewResolver = new RythmViewResolver(); + viewResolver.setCache(true); + viewResolver.setSuffix(".html"); + return viewResolver; + } + + public static void main(String[] args) { + SpringApplication.run(DemoApplication.class, args); + } + } +