Skip to content
Advertisement

post method not supported in patch method

I want edit entity with validating by hibernate-validator, but when calling the patch method, an error is thrown: post method not supported. How to make @PatchMapping work correctly? I am a beginner developer, help me please.

Controller:

JavaScript

Service:

JavaScript

Repository:

JavaScript

html form:

JavaScript

Advertisement

Answer

you can not use ‘PATCH’ for the form method attribute. only ‘GET’ and ‘POST’ methods are allowed(source).

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement