這是從Spring框架或REST原則 什麼限制我的Tomcat配置(server.xml中)做文件
是的,你有話跟你的Tomcat配置。
您必須啓用解析DELETE在server.xml中的方法(同樣適用於PUT)如下:
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
parseBodyMethods="POST,PUT,DELETE"
redirectPort="8443" />