title: Spring Boot 2 Thymeleaf Configuration Ignoring 'templates'
body: <p>I'm migrating an existing application to Spring 5.0.0.M3 &amp; Spring Boot 2.0.0.M3.  With Spring Boot I'm also importing the Thymeleaf starter.</p>
  
  <p>The application has 2 template folders <code>mails</code> and <code>templates</code>. If I specify the below configuration for email templates, the <code>templates</code> folder is ignored; e.g. I'm getting <code>FileNotFoundException</code> for templates in this folder.</p>
  
  <pre><code>@Configuration
  public class ThymeleafConfiguration {
  
      @SuppressWarnings("unused")
      private final Logger log = LoggerFactory.getLogger(ThymeleafConfiguration.class);
  
      @Bean
      @Description("Thymeleaf template resolver serving HTML 5 emails")
      public ClassLoaderTemplateResolver emailTemplateResolver() {
          ClassLoaderTemplateResolver emailTemplateResolver = new ClassLoaderTemplateResolver();
          emailTemplateResolver.setPrefix("mails/");
          emailTemplateResolver.setSuffix(".html");
          emailTemplateResolver.setTemplateMode("HTML5");
          emailTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
          emailTemplateResolver.setOrder(1);
          return emailTemplateResolver;
      }
  }
  </code></pre>
  
  <p>I've tried setting the <code>setOrder</code> parameter to 2, 10, etc. which made no difference. If I remove the resolver method, the <code>templates</code> folder is recognized, but the <code>mails</code> folder isn't.</p>
  
  <p>Any ideas what might be going on?</p>