según la documentación del resorte here:Solicitud 'post' método no soportado
While HTTP defines these four methods, HTML only supports two: GET and POST. Fortunately, there are two possible workarounds: you can either use JavaScript to do your PUT or DELETE, or simply do a POST with the 'real' method as an additional parameter (modeled as a hidden input field in an HTML form).
Han hecho esta última, y se puede lograr con la primavera siguiente MVC forma la etiqueta:
<form:form method="delete">
<input type="submit" value="Delete"/>
</form:form>
El problema es cuando hago clic en 'Eliminar' mi página arroja el siguiente error:
HTTP Status 405 - Request method 'POST' not supported
I ch Anged el nivel de depuración de org.springframework.web
para depurar y encontró el siguiente mensaje:
DEBUG AnnotationMethodHandlerExceptionResolver - Resolving exception from handler [[email protected]]:
org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported
he usado con RestClient método Delete y el método se llama como se esperaba. ¿Qué estoy haciendo mal aquí?
me trataron POST como un parámetro utilizando RESTClient y devolvió un código de estado: 405 Método no permitido. ¿Dónde podría estar el problema? – Joopiter
¿Puedes publicar tu controlador? – hisdrewness
@hisdrewness sí puedo, pero no creo que el problema esté en el mapeo de url del Controlador ya que usar RestClient funciona bien. – Joopiter