Skip to content
Snippets Groups Projects
Select Git revision
  • b94ca0312c0b4c31730b65167bbce0a37538283a
  • main default
  • cookie
3 results

_FreeMarkerInitializer.java

Blame
  • user avatar
    thtamagnau authored
    1b2edf12
    History
    _FreeMarkerInitializer.java 686 B
    package com.uca.gui;
    
    import com.uca.StartServer;
    import freemarker.template.Configuration;
    import freemarker.template.TemplateExceptionHandler;
    
    import java.util.Locale;
    
    public class _FreeMarkerInitializer {
    
        public static Configuration getContext() {
            //Configure FreeMarker
            Configuration configuration = new Configuration(Configuration.VERSION_2_3_30);
            configuration.setClassForTemplateLoading(StartServer.class, "/views");
            configuration.setDefaultEncoding("UTF-8");
            configuration.setLocale(Locale.FRANCE);
            configuration.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
    
            return configuration;
        }
    }