コード例 #1
2
 @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;
 }
コード例 #3
0
  @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
ファイル: ThymeleafFilter.java プロジェクト: jeslopes72/wuic
 /**
  * Creates the template resolver.
  *
  * @return the resolver
  */
 private TemplateResolver createTemplateResolver() {
   final ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver();
   templateResolver.setPrefix("/sample/scroller/");
   templateResolver.setSuffix(".html");
   return templateResolver;
 }