title: How to Logout using SpringBoot
body: <p>i am creating a login form using Spring boot. i don't know how to logout.what i tried so far i attached below.</p>
  <p><strong>index.html</strong></p>
  <pre><code> &lt;h1&gt;Welcome to Home Page&lt;/h1&gt;
     &lt;form th:action=&quot;@{/logout}&quot; method=&quot;post&quot;&gt;
          &lt;input type=&quot;submit&quot; value=&quot;Logout&quot; /&gt;
      &lt;/form&gt;
  </code></pre>
  <p><strong>UserContoller</strong></p>
  <pre><code>@RequestMapping(value = {&quot;/logout&quot;}, method = RequestMethod.GET)
  public String fetchSignoutSite(HttpServletRequest request, HttpServletResponse response){
        
  
      return &quot;redirect:/login&quot;;
     
  }
  </code></pre>
  <p><strong>Mehtod not allowed</strong>
  <strong>Error</strong></p>
  <pre><code>org.thymeleaf.exceptions.TemplateInputException: Error resolving template [error], template might not exist or might not be accessible by any of the configured Template Resolvers
      at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
      at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
      at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) [thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
      at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) [thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
  </code></pre>