Пример #1
0
 @Bean
 public TemplateResolver templateResolver() {
   TemplateResolver templateResolver = new ServletContextTemplateResolver();
   templateResolver.setPrefix("/WEB-INF/views/");
   templateResolver.setSuffix(".html");
   templateResolver.setTemplateMode("HTML5");
   return templateResolver;
 }
Пример #2
0
 @Bean
 public TemplateResolver templateResolver() {
   TemplateResolver templateResolver = new ClassLoaderTemplateResolver();
   templateResolver.setPrefix("views/");
   templateResolver.setSuffix(".html");
   templateResolver.setTemplateMode("HTML5");
   return templateResolver;
 }
 @Bean
 public TemplateResolver templateResolver() {
   TemplateResolver templateResolver = new ServletContextTemplateResolver();
   templateResolver.setPrefix(VIEWS);
   templateResolver.setSuffix(".html");
   templateResolver.setTemplateMode("HTML5");
   templateResolver.setCacheable(false);
   return templateResolver;
 }
Пример #4
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;
 }