title: Return HTML page from Spring controller
body: <p>I have a Spring Boot app setup as a REST api. I now also want to be able to serve simple HTML pages to the client, without the use on any template engine like Thymeleaf. I want access to the HTML pages to fall under the same security constraints setup by Spring Security with the use of <code>WebSecurityConfigurerAdapter</code>, already present in my app.</p>
  
  <hr>
  
  <p>What I've tried is having a <code>Controller</code>:</p>
  
  <pre><code>@Controller
  public class HtmlPageController {
      @RequestMapping(value = "/some/path/test", method = RequestMethod.GET)
      public String getTestPage() {
          return "test.html";
      }
  }
  </code></pre>
  
  <p>and placing the <code>test.html</code> file in <code>/resources/test.html</code> or <code>/webapp/WEB-INF/test.html</code>.</p>
  
  <p>Every time I try to access the page at <code>localhost:8080/some/path/test</code> a <code>404</code> is returned.</p>
  
  <p><strong>How do I make this work?</strong></p>