title: Spring Boot URL mapping for static HTML
body: <p>My Spring Boot appliation will basically consist of two main "modules":</p>
  
  <ul>
  <li>A "Web" Module that consists of static HTML pages, available to the public (unauthenticated/anonymouse users); and</li>
  <li>An "App" Module that consists of a number of dynamic pages, each of which require (Spring Security-based) authentication to access</li>
  </ul>
  
  <p>The basic app structure is:</p>
  
  <ul>
  <li><code>index.html</code>: Homepage, mapped from <code>http://localhost:8080/</code></li>
  <li><code>about.html</code>: About page, mapped from <code>http://localhost:8080/about</code></li>
  <li><code>contact.html</code>: Contact page, mapped from <code>http://localhost:8080/contact</code></li>
  <li><code>login.html</code>: Login page, mapped from <code>http://localhost:8080/login</code></li>
  <li><code>dashboard.html</code>: Dashboard/landing page you get to after logging in, mapped from <code>http://localhost:8080/account</code></li>
  <li>All other pages under <code>http://localhost:8080/account/*</code> will be MVC/dynamic pages with typical <code>@RequestMapping</code> mappings</li>
  </ul>
  
  <p>What is not clear to me is, for the static ("public web") HTML pages, do I:</p>
  
  <ul>
  <li>Just use standard controller-based <code>@RequestMappings</code> that render some Thymeleaf/Handlebars template (which simply has no data model since the content is static)? Or do I:</li>
  <li>Treat these pages as static content (same as CSS/JS) and serve them as <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-web-applications.html#boot-features-spring-mvc-static-content" rel="nofollow">static content as Spring Boot prescribes</a>? If this is the correct option, then how do I achieve the correct URL mappings (so, for example, users can just go to <code>http://localhost:8080/contact</code> instead of <code>http://localhost:8080/contact.html</code>)?</li>
  </ul>