List of usage examples for org.springframework.data.rest.webmvc.config JsonPatchHandler apply
public <T> T apply(IncomingRequest request, T target) throws Exception
From source file:org.springframework.data.rest.webmvc.config.PersistentEntityResourceHandlerMethodArgumentResolver.java
private Object readPatch(IncomingRequest request, ObjectMapper mapper, Object existingObject) { try {/*from ww w . j ava 2s . co m*/ JsonPatchHandler handler = new JsonPatchHandler(mapper, reader); return handler.apply(request, existingObject); } catch (Exception o_O) { if (o_O instanceof HttpMessageNotReadableException) { throw (HttpMessageNotReadableException) o_O; } throw new HttpMessageNotReadableException(String.format(ERROR_MESSAGE, existingObject.getClass()), o_O); } }