Spring Rest POST Json RequestBody Content type not supported

后端 未结 14 1686
粉色の甜心
粉色の甜心 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:42

    Really! after spending 4 hours and insane debugging I found this very strange code at com.fasterxml.jackson.databind.deser.DeserializerCache

    if (deser == null) {
        try {
            deser = _createAndCacheValueDeserializer(ctxt, factory, type);
        } catch (Exception e) {
            return false;
        }
    }
    

    Ya, the problem was double setter.

提交回复
热议问题