private void applyProperties(FreeMarkerConfigurationFactory factory) {
    factory.setTemplateLoaderPath(properties.getTemplateLoaderPath());
    factory.setPreferFileSystemAccess(Boolean.parseBoolean(properties.getPreferFileSystemAccess()));
    factory.setDefaultEncoding(properties.getDefaultEncoding());
    factory.setFreemarkerVariables(properties.getFreemarkerVariables());

    if (logger.isDebugEnabled()) logger.debug("");
  }
  @Bean
  @ConditionalOnMissingBean(name = "freeMarkerViewResolver")
  @ConditionalOnProperty(name = "spring.freemarker.enabled", matchIfMissing = true)
  public FreeMarkerViewResolver freeMarkerViewResolver() {
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
    properties.applyToViewResolver(resolver);

    if (logger.isDebugEnabled()) logger.debug("");

    return resolver;
  }