@Bean public FreeMarkerConfigurer configureFreemarker() { FreeMarkerConfigurer freeMarkerConfigurer = new FreeMarkerConfigurer(); Properties settings = new Properties(); settings.setProperty(freemarker.template.Configuration.TEMPLATE_EXCEPTION_HANDLER_KEY, "rethrow"); freeMarkerConfigurer.setFreemarkerSettings(settings); freeMarkerConfigurer.setTemplateLoaderPath(FreeMarkerProperties.DEFAULT_TEMPLATE_LOADER_PATH); return freeMarkerConfigurer; }
public FreeMarkerConfigurer(Configuration emailConfiguration, Configuration smsConfiguration, OghamCommonTemplateProperties templateProperties, OghamEmailProperties emailProperties, OghamSmsProperties smsProperties, FreeMarkerProperties springProperties) { super(); this.emailConfiguration = emailConfiguration; this.smsConfiguration = smsConfiguration; this.templateProperties = templateProperties; this.emailProperties = emailProperties; this.smsProperties = smsProperties; this.springProperties = springProperties; }