title: How to load css file in Micronaut using Thymeleaf?
body: <p>How to load a CSS file in Micronaut using Thymeleaf?     </p>
  
  <p>Here is my <code>index.html</code> contents:</p>
  
  
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Demo&lt;/title&gt;
      &lt;link th:href="@{public/style.css}" type="text/css" rel="stylesheet" /&gt;
  &lt;/head&gt;
  &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is <code>application.yml</code>:</p>
  
  
  
  <pre><code>router:
    static:
      resources:
        default:
          enabled: true
          mapping: /**
          paths: 'classpath:public'
  </code></pre>
  
  <p>Image note: </p>
  
  <p><img src="https://i.stack.imgur.com/evvJD.png" alt="resource directory structure"></p>