1. Whitelabel Error Page Error occurs when the Page submits the DELETE request
<button th:attr="del_uri=@{/emp/}+${emp.id}" class="btn btn-sm btn-danger deleteBtn">Del</button>
<form id="deleteEmpForm" method="post">
<input type="hidden" name="_method" value="delete"/>
</form>
<script>
$(".deleteBtn").click(function(){
$("#deleteEmpForm").attr("action",$(this).attr("del_uri")).submit();
return false;
});
</script>
solution
You only need to configure [Application.Properties] in the SpringBoot configuration:
spring.mvc.hiddenmethod.filter.enabled=true
Read More:
- Solve the problem of There was an unexpected error (type=Internal Server Error, status=500) (using Thymeleaf to report an error)
- [How to Solve] ashx Http Delete method not allowed
- Solve the problem of request method ‘get’ not supported
- spring security There was an unexpected error (type=Forbidden, status=403).
- HTTP 405 Error: Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
- The problem that headers [‘content-type ‘] does not work is set in the Axios get method request interface
- HTTP error 405.0 – method not allowed solution for put and delete operations of rest Service on iis7.5
- Arduino reports an error when writing a custom library file to solve the problem of not name of type, not declared in this scope
- Springcloud Feign Upload MultipartFile Error: Current req is not a multipart request Content type not supported
- When feign is called, the solution of request method ‘post’ not supported appears
- In the HTML page request Ajax times 400 error, solve Yii submit post form 400 error, and Ajax post request 400 problem (example code)
- Solve the problem that springboot does not scan @ repository
- Error type referred to is not an annotation type:RedisCache
- An error was reported when idea compiles Java: no symbol was found_ How to solve this problem
- Ant Design ‘cross env’ is not an internal or external command, nor is it an error reporting problem for a runnable program
- Python’s importerror: DLL load failed: the specified module was not found and the problem was solved
- Solve the problem that power view in Excel prompts activate method of oleobject class failed or activate method like oleobject is invalid
- Function definition is not allowed here
- The spring boot project was first created, pom.xml The error is Maven configuration problem. How to solve it?
- Flask Request an extension before_request after_request errorhandler