Spring Rest POST Json RequestBody Content type not supported

后端 未结 14 1692
粉色の甜心
粉色の甜心 2020-12-05 05:58

When I try to post new object with post method. RequestBody could not recognize contentType. Spring is already configured and POST could work with others objects, but not th

14条回答
  •  无人及你
    2020-12-05 06:57

    I had the same issue when I had two setters one with Enum and one String. I had to use @JsonSetter annotation which tells Jackson what setter method to use during serialization. This solved my issue.

提交回复
热议问题