use of ratpack.groovy.template.internal.TextTemplateRenderingEngine in project ratpack by ratpack.
the class TextTemplateModule method provideGroovyTemplateRenderingEngine.
@Provides
@Singleton
TextTemplateRenderingEngine provideGroovyTemplateRenderingEngine(ServerConfig serverConfig, ExecController execController, ByteBufAllocator bufferAllocator, Config config) {
String templatesPath = config.getTemplatesPath();
FileSystemBinding templateDir = serverConfig.getBaseDir().binding(templatesPath);
if (templateDir == null) {
throw new IllegalStateException("templatesPath '" + templatesPath + "' is outside the file system binding");
}
return new TextTemplateRenderingEngine(bufferAllocator, templateDir, serverConfig.isDevelopment(), config.staticallyCompile);
}
Aggregations