code: @SuppressWarnings("unchecked")
    @Override
    protected void loadSettings(ServletContext servletContext) {
      try {
        Properties properties = new Properties();
        // 1. first META-INF/freemarker.properties
        List<URL> urls = ClassLoaders.getResources("META-INF/freemarker.properties", getClass());
        for (URL url : urls)
          properties.putAll(getProperties(url));
  
        // 2. second global freemarker.properties
        urls = ClassLoaders.getResources("freemarker.properties", getClass());
        for (URL url : urls)
          properties.putAll(getProperties(url));
  
        // 3. system properties
        Properties sysProps = System.getProperties();
        Enumeration<?> sysKeys = sysProps.propertyNames();
        while (sysKeys.hasMoreElements()) {
          String key = (String) sysKeys.nextElement();
          String value = sysProps.getProperty(key);
          if (key.startsWith("freemarker.")) {
            properties.put(Strings.substringAfter(key, "freemarker."), value);
          }
        }
  
        // 4 add setting and log info
        StringBuilder sb = new StringBuilder();
        @SuppressWarnings("rawtypes")
        List keys = CollectUtils.newArrayList(properties.keySet());
        Collections.sort(keys);
        for (Iterator<String> iter = keys.iterator(); iter.hasNext();) {
          String key = iter.next();
          String value = (String) properties.get(key);
          if (null != key && null != value) {
            addSetting(key, value);
            sb.append(key).append("->").append(value);
            if (iter.hasNext()) sb.append(',');
          }
        }
        // 5 support beangle profiles
        String profiles = System.getProperty("beangle.cdi.profiles");
        if (Strings.contains(profiles, "dev")) {
          config.setTemplateUpdateDelayMilliseconds(0);
        }
        logger.info("Freemarker properties:{} ", sb);
      } catch (TemplateException e) {
        logger.error("Error while setting freemarker.properties", e);
      }
    }
docs: Load the multi settings from the /META-INF/freemarker.properties and
  /freemarker.properties file on the classpath
  
  @see freemarker.template.Configuration#setSettings for the definition of
  valid settings