title: Thymeleaf cannot detect templates inside spring-boot project
body: <p>I have the following project structure in my Spring boot app, in which I want to use Thymeleaf</p>
  <pre><code>projectName
      -Gradle-Module1(Spring boot module)
          -build
          -src
              -main
              -resources
                  -templates
                      index.html
          build.gradle
      -Gradle-Module2
          ...
      build.gradle
      ...
  </code></pre>
  <p>but the spring-boot cannot find my template directory and is showing warning</p>
  <blockquote>
  <p>Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)</p>
  </blockquote>
  <p>PS: I am using <code>@EnableAutoConfiguration</code></p>
  <p>In my controller code I am doing something like:</p>
  <pre><code>@Controller
  @EnableAutoConfiguration
  public class BaseController {
  
      @RequestMapping(value = &quot;/&quot;)
      public String index() {
          return &quot;index.html&quot;;
      }
  }
  </code></pre>
  <p>and <code>index.html</code> file just prints hello world.</p>
  <p>So typically it should look inside <code>src/resources/templates/</code>(of same Gradle module I suppose), but somehow it is not able to find it.</p>
  <p>When I try to access <code>localhost:8080</code> I am getting below error</p>
  <blockquote>
  <p>Error resolving template &quot;index.html&quot;, template might not exist or might not be accessible by any of the configured Template Resolvers`</p>
  </blockquote>
  <p>Is there anything I am missing?<br />
  Any pointers appreciated. Thanks.</p>