@Bean
 public ServletContextTemplateResolver templateResolver() {
   ServletContextTemplateResolver resolver = new ServletContextTemplateResolver();
   resolver.setPrefix("/WEB-INF/templates/");
   resolver.setSuffix(".html");
   resolver.setTemplateMode("HTML5");
   resolver.setCharacterEncoding("UTF-8");
   resolver.setOrder(1);
   resolver.setCacheable(false);
   return resolver;
 }
示例#2
0
 @Bean
 public ServletContextTemplateResolver thymeleafTemplateResolver() {
   ServletContextTemplateResolver resolver = new ServletContextTemplateResolver();
   resolver.setPrefix("/WEB-INF/views/");
   resolver.setSuffix(".html");
   resolver.setTemplateMode("HTML5");
   resolver.setCacheable(true);
   return resolver;
 }
  @Bean
  @Description("Thymeleaf template resolver serving HTML 5")
  public ServletContextTemplateResolver templateResolver() {
    ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver();
    templateResolver.setPrefix("/WEB-INF/html/");
    templateResolver.setSuffix(".html");
    templateResolver.setTemplateMode("HTML5");

    return templateResolver;
  }
示例#4
0
 @Bean
 public ITemplateResolver templateResolver() {
   ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver();
   templateResolver.setPrefix("/WEB-INF/pages/");
   templateResolver.setSuffix(".html");
   templateResolver.setTemplateMode("HTML5");
   templateResolver.setCharacterEncoding("utf-8");
   templateResolver.setCacheable(false);
   return templateResolver;
 }
示例#5
0
 /**
  * Creates the template resolver.
  *
  * @return the resolver
  */
 private TemplateResolver createTemplateResolver() {
   final ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver();
   templateResolver.setPrefix("/sample/scroller/");
   templateResolver.setSuffix(".html");
   return templateResolver;
 }