@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 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;
 }