@Bean
 public TemplateResolver templateResolver() {
   TemplateResolver templateResolver = new ServletContextTemplateResolver();
   templateResolver.setPrefix(VIEWS);
   templateResolver.setSuffix(".html");
   templateResolver.setTemplateMode("HTML5");
   templateResolver.setCacheable(false);
   return templateResolver;
 }
예제 #2
0
 /*
  * Configure Template Resolver - Thymeleaf
  */
 @Bean
 public TemplateResolver webTemplateResolver() {
   TemplateResolver templateResolver = new ServletContextTemplateResolver();
   templateResolver.setPrefix(TEMPLATE_RESOLVER_PREFIX);
   templateResolver.setSuffix(TEMPLATE_RESOLVER_SUFFIX);
   templateResolver.setTemplateMode(TEMPLATE_RESOLVER_TEMPLATE_MODE);
   templateResolver.setCharacterEncoding(TEMPLATE_RESOLVER_CHAR_ENCODING);
   templateResolver.setCacheable(false);
   return templateResolver;
 }
 @Bean
 public TemplateResolver taskTemplateResolver() {
   final TemplateResolver resolver = new TemplateResolver();
   resolver.setPrefix(this.storageService.getStoragePath());
   resolver.setSuffix(".html");
   resolver.setTemplateMode("HTML5");
   resolver.setOrder(3);
   resolver.setCacheable(false);
   resolver.setCharacterEncoding("UTF-8");
   resolver.setResourceResolver(new OlympusCustomThymeleafResourceResolver());
   return resolver;
 }
 @Bean
 public TemplateResolver customTemplateResolver() {
   if (StringUtils.isEmpty(this.customPagesPath)) {
     return null;
   }
   final TemplateResolver resolver = new TemplateResolver();
   resolver.setPrefix(this.customPagesPath);
   resolver.setSuffix(".html");
   resolver.setTemplateMode("HTML5");
   resolver.setOrder(4);
   resolver.setCacheable(false);
   resolver.setCharacterEncoding("UTF-8");
   resolver.setResourceResolver(new FileResourceResolver());
   return resolver;
 }