title: Request method 'POST' not supported
body: <p>I have a spring-Boot application, and 
  I am trying to send an object using post method to the below controller:</p>
  
  <pre><code>@PostMapping("/suggestevent")
      public String receiveSuggestedEvent(@ModelAttribute SuggestedEvent event) {
  
          return "redirect:/suggestEvent";
      }
  </code></pre>
  
  <p>but it complains with:</p>
  
  <pre><code>There was an unexpected error (type=Method Not Allowed, status=405).
  Request method 'POST' not supported
  </code></pre>
  
  <p>So, what is wrong?</p>
  
  <p>Update:
  I have tried this and it also did not work</p>
  
  <pre><code>@RequestMapping(value = "/suggestevent", method = RequestMethod.POST)
  </code></pre>
  
  <p>The form contains some simple inputes, and a select, which works based on Thyemeleaf. Here is my form:</p>
  
  <pre><code>&lt;form th:action="@{/suggestevent}" method="post"&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;label for="title"&gt;Title&lt;/label&gt;
                       &lt;input type="text"
                          class="form-control" id="title" placeholder="Event title"
                          th:value="${event.title}"
                          name="title" required="required"/&gt;
                  &lt;/div&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;label for="mainFouce"&gt;Main Focus&lt;/label&gt;
                       &lt;input type="text"
                          class="form-control" id="Focus" placeholder="Focus"
                          th:value="${event.mainFouce}"
                          name="Focus" required="required"/&gt;
                  &lt;/div&gt;
  
                  Event Type
                  &lt;div class="form-group"&gt;
                      &lt;select class="form-control" name="type" th:value="${event.type}"&gt;
                          &lt;option value="volvo"&gt;Party&lt;/option&gt;
                          &lt;option value="saab"&gt;Workshop&lt;/option&gt;
                          &lt;option value="fiat"&gt;Friendship&lt;/option&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;label for="city"&gt;Area&lt;/label&gt;
                       &lt;input type="text"
                          class="form-control" id="area"
                          th:value="${event.area}"
                          placeholder="Berlin, Estonia ,or even Asia" name="area"
                          required="required"/&gt;
                  &lt;/div&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;label for="description"&gt;Description&lt;/label&gt;
                      &lt;textarea name="description" class="form-control"
                          th:value="${event.description}"
                          required="required" form="usrform"
                          placeholder="What makes it an special event?"&gt;&lt;/textarea&gt;
                  &lt;/div&gt;
  
                  &lt;button type="submit" class="btn btn-default"&gt;Submit&lt;/button&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>The sent object is:</p>
  
  <pre><code>@Entity
  @Data
  public class SuggestedEvent {
  
      @Id
      @GeneratedValue
      Long id;
  
      String title;
      String mainFouce;
      EventType type;
      String area;
      String description;
  
  }
  </code></pre>
  
  <p><strong>The postman can successfully reach the controller, but the thyemeleaf complains!!!</strong></p>