title: Serving static resources with Micronaut, with directory hierarchy
body: <p>Given the following configuration in <code>application.yml</code>, I would expect to be able to serve files from both of the following paths:</p>
  <ul>
  <li>http://localhost/static/image.png  (from /root/static/image.png)</li>
  <li>http://localhost/static/folder/image.png  (from /root/static/folder/image.png)</li>
  </ul>
  <p>However, only the first path works.  The second returns a 200 status code with the following in the response body: <code>{&quot;message&quot;:&quot;Page Not Found&quot;,&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:&quot;/static/folder/image.png&quot;,&quot;templated&quot;:false}}}</code></p>
  <p>The issue seems to be the extra subdirectory, but I would have expected the <code>**/*</code> in the mapping field to allow for subdirectories.  FWIW, I get the same error if I request a resource that does not exist.</p>
  <p>This is on Micronaut 2.</p>
  <pre class="lang-yaml prettyprint-override"><code>micronaut:
    application:
      name: api
    router:
      static-resources:
        default:
          paths: file:/root/static
          mapping: /static/**/*
          enabled: true
  
  </code></pre>