title: Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
body: <p>I have spring boot mvc with a little jpa back for training in this system.
  I have stylese with connected via thymeleaf links:</p>
  
  <pre><code>&lt;link rel="stylesheet" data-th-href="@{/bs/dist/css/bootstrap.css}"&gt;
  &lt;link rel="stylesheet" data-th-href="@{/htmlElements/myElements.css}"&gt;
  </code></pre>
  
  <p>this is my project structure</p>
  
  <p><a href="https://i.stack.imgur.com/eWQwf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eWQwf.jpg" alt="project structure"></a>
      Yesterday everything was working fine, but today I don't see my styles at all. After some researches I get this data:</p>
  
  <ol>
  <li>direct link to <a href="http://localhost:8080/htmlElements/myElements.css" rel="nofollow noreferrer">http://localhost:8080/htmlElements/myElements.css</a> do not response.</li>
  <li><p>next I restarted my app with DEBUG enabled, and saw that </p>
  
  <p>2018-06-03 12:52:42.957 DEBUG 10888 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/bs/dist/css/bootstrap.css]
  2018-06-03 12:52:42.957 DEBUG 10888 --- [nio-8080-exec-2] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /bs/dist/css/bootstrap.css
  2018-06-03 12:52:42.958 DEBUG 10888 --- [nio-8080-exec-3] o.s.b.w.s.f.OrderedRequestContextFilter  : Bound request context to thread: org.apache.catalina.connector.RequestFacade@1298ec89
  2018-06-03 12:52:42.958 DEBUG 10888 --- [nio-8080-exec-3] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/htmlElements/myElements.css]
  2018-06-03 12:52:42.958 DEBUG 10888 --- [nio-8080-exec-3] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /htmlElements/myElements.css
  2018-06-03 12:52:42.963 DEBUG 10888 --- [nio-8080-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
  2018-06-03 12:52:42.963 DEBUG 10888 --- [nio-8080-exec-3] .m.m.a.ExceptionHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
  2018-06-03 12:52:42.963 DEBUG 10888 --- [nio-8080-exec-2] .w.s.m.a.ResponseStatusExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
  2018-06-03 12:52:42.963 DEBUG 10888 --- [nio-8080-exec-3] .w.s.m.a.ResponseStatusExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
  2018-06-03 12:52:42.964 DEBUG 10888 --- [nio-8080-exec-3] .w.s.m.s.DefaultHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
  2018-06-03 12:52:42.964  WARN 10888 --- [nio-8080-exec-3] o.s.web.servlet.PageNotFound             : Request method 'GET' not supported
  2018-06-03 12:52:42.964 DEBUG 10888 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolving exception from handler [null]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
  2018-06-03 12:52:42.964  WARN 10888 --- [nio-8080-exec-2] o.s.web.servlet.PageNotFound             : Request method 'GET' not supported
  2018-06-03 12:52:42.964 DEBUG 10888 --- [nio-8080-exec-3] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
  2018-06-03 12:52:42.964 DEBUG 10888 --- [nio-8080-exec-2] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling</p></li>
  </ol>
  
  <p>So, i can't understand what the matter. I do not touch any spring boot autoconfig things. 
  I think i should reconfigure WebMvcConfigurer.class with addResourceHandlers() its method, but i cant find correct guide how to realise it with spring boot.</p>
  
  <p>I can make css like usual @GetMapping with proper position at "/templates", but it bad idea?</p>
  
  <p>UPDATE | PARTIALLY SOLVED
  i found 1 contoller with @PostMapping without value. Remove it.Restart - styles appears. Then I add this @PostMapping() to the method of @Controller class and do not see those bug. So if anyone get the same problem: restart ide -> then check ur controllers.
  thx 4 help guys</p>