code: @Validate
      public synchronized void configure() {
          // Thymeleaf specifics
          String mode = configuration.getWithDefault("application.template.thymeleaf.mode", "HTML5");
  
          int ttl = configuration.getIntegerWithDefault("application.template.thymeleaf.ttl", 60 * 1000);
          if (configuration.isDev()) {
              // In dev mode, reduce the ttl to the strict minimum so we are sure to have updated template rendering.
              ttl = 1;
          }
  
  
          LOGGER.debug("Thymeleaf configuration: mode={}, ttl={}", mode, ttl);
  
          // A TCCL switch is required here as the default Thymeleaf engine initialization triggers a class loading
          // from a class that may be present in the class path  (org/apache/xerces/xni/parser/XMLParserConfiguration).
          // By setting the TCCL, it fails quietly, if not, it may find it but failed to instantiate it (version
          // mismatch or whatever). As this class is only used to  support the HTML5LEGACY Templates (so not use here),
          // we don't really care.
  
          final ClassLoader orig = Thread.currentThread().getContextClassLoader();
          try {
              Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
              engine = new WisdomTemplateEngine(dialects);
          } finally {
              Thread.currentThread().setContextClassLoader(orig);
          }
  
          // Initiate the template resolver.
          TemplateResolver resolver = new TemplateResolver();
          resolver.setResourceResolver(new WisdomURLResourceResolver(this));
          resolver.setTemplateMode(mode);
          resolver.setCacheTTLMs((long) ttl);
          engine.setTemplateResolver(resolver);
  
          engine.setMessageResolver(messageResolver);
          engine.initialize();
      }
docs: Initializes the thymeleaf template engine.