spark.template.rocker.RockerEngine Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spark-template-rocker Show documentation
Show all versions of spark-template-rocker Show documentation
Rocker Template Engine implementation for Spark
The newest version!
package spark.template.rocker;
import java.util.Map;
import com.fizzed.rocker.Rocker;
import spark.ModelAndView;
import spark.TemplateEngine;
/**
*/
public class RockerEngine extends TemplateEngine {
/**
* {@inheritDoc}
*/
@Override
public String render(ModelAndView modelAndView) {
return Rocker.template(modelAndView.getViewName())
.bind((Map)modelAndView.getModel())
.render()
.toString();
}
}