public class FreemarkerTemplateLoader
extends freemarker.cache.URLTemplateLoader
The problem is that dropwizard views mechanism accepts only template path from classpath so if template provided by a custom class loader, default mechanism would try to load it with application class loader. This loader would take template name (already prepared to be absolute classpath path) and search it through all registered class loaders (based on classpath prefixes).
Loader installed with main builder configuration
ServerPagesBundle.ViewsBuilder.enableFreemarkerCustomClassLoadersSupport()
shortcut (applied globally).
| Constructor and Description |
|---|
FreemarkerTemplateLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected java.net.URL |
getURL(java.lang.String name) |