相关疑难解决方法(0)

Spring boot:不支持请求方法“PUT”

Request method 'PUT' not supported我在使用Restful API 上的PUT方法上传文件时遇到错误。

以下是上传到此票证的信息。

  1. 客户端日志
  2. 休息控制器
  3. Spring Boot 应用程序配置
  4. Tomcat日志
  5. POM.xml

1. 客户端日志

$ curl -X PUT -T  "/cygdrive/c/a/documents/test.pptx" http://localhost:8080/piranha-storage-service/buckets/gnaval.bucket1/test.pptx
<html><head><title>Apache Tomcat/7.0.52 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - Request method 'PUT' not supported</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Request method 'PUT' not supported</u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested …
Run Code Online (Sandbox Code Playgroud)

rest put spring-boot

3
推荐指数
1
解决办法
3万
查看次数

标签 统计

put ×1

rest ×1

spring-boot ×1