title: Canonical path warning
body: <p>I have an annoying warning in my log files:</p>
  <pre><code>2022-08-26 16:05:39.193  WARN 2884 --- [nio-8085-exec-4] o.a.c.w.AbstractFileResourceSet
  : Resource for web application [] at path [/manager/6392/user/avatar/68550.] was not loaded
  as the canonical path [/manager/6392/user/avatar/68550] did not match. 
  Use of symlinks is one possible cause.
  </code></pre>
  <p>One possible cause is this:</p>
  <pre><code>&lt;a class=&quot;avatar avatar-sm m-t-5&quot;&gt; &lt;img th:if=&quot;${user.hasAvatar()}&quot;
                                     class=&quot;img-responsive&quot;
                                     th:src=&quot;@{/manager/{locationId}/user/avatar/{userId}.(locationId=${#authentication.principal.getLocation().getId()}, userId=${user.getId()})}&quot;
                                     th:title=&quot;${user.getFullname()}&quot;
                                     th:unless=&quot;${user.hasAvatar()}&quot;
                                     class=&quot;avatar-word img-responsive&quot;
                                  &lt;/a&gt;
  </code></pre>
  <p>The endpoint looks like this:</p>
  <pre><code>@GetMapping(path = &quot;/user/avatar/{userId}.{extension}&quot;)
  @ResponseBody
  public byte[] getUserAvatar(@PathVariable Long locationId, @PathVariable Long userId,
  @PathVariable String extension) 
  </code></pre>
  <p>And it never uses the extension!</p>
  <p>What should I do to fix this? I'm thinking about removing the dot and the extension from the endpoint, and then removing the dot from the src attribute in a few places.</p>