Recently we were moved to the 3.0 controller in this way:
@Controller is a string of onsubmit (form form, error errors) {// handle POST} @RequestMapping {method = RequestMethod.GET} protected from the public class MyController {@RequestMapping (method = RequestMethod.POST) zero getForm (form form) protected {// get handle}}
Now we are getting lots of exception because of our log of head request
org.springframework.web.HttpRequestMethodN OtSupportedException:. The request method 'head' is not supported on org.springframework.web.servlet.mvc.annotation.nnnotationMethodHandlerAdapter.invokeHandlerMethod (AnnotationMethodHandlerAdapter.java:422) on org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter $ ServletHandlerMethodResolver.resolveHandlerMethod ( AnnotationMethodHandlerAdapter.java:621) on .springframework.web.servlet.mvc. Annotation.AnnotationMethodHandlerAdapter.handle (AnnotationMethodHandlerAdapter.java:415) ...
I want to support the head as request received request in the same way, but of course follow the HTTP reference: < / P>
Similar to getting the main method, except that the server is not necessary / returned the message in response. In response to the head request, metignation in the HTTP header should be similar to the information sent in response to the GET request. This method can be used to obtain metatinization about the unit contained by the request without transferring unit-body. This method is often used to test hypertext links for validity, accessibility and recent modification.
Does anyone have an elegant solution or is there a spring solution of the outside box?
I searched the web but did not find any answer.
I believe you want this:
Comments
Post a Comment