wildfly 10.1.0.Finalでhttp patchメソッドを使用してREST API を実行しようとしています。このエンドポイントでリクエストを行った場合、405 Method Not Allowed が返されます。
私はjavax.javaee-api:8.0を使用しています。
パッチ:
@PATCH
@Path("/documents/{id}")
public Response patchDocument(@PathParam("id") String id,
@ApiParam(value = "", required = true) @Valid PatchRequestSTO jsonPatch) {
return ok(jsonPatch.toString()).build();
}
応答: 405 メソッドは許可されていません
Allow:OPTIONS, PUT
Connection:keep-alive
Content-Length:0
Date:Fri, 05 Jan 2018 07:55:44 GMT
Server:WildFly/10
X-Powered-By:Undertow/1
置く:
@PUT
@Path("/documents/{id}")
public Response putDocument(@PathParam("id") String id,
@ApiParam(value = "", required = true) @Valid PatchRequestSTO jsonPatch) {
return ok(jsonPatch.toString()).build();
}
応答: 200 OK