How to handle jackson deserialization error for all kinds of data mismatch in spring boot
问题 I know there is some similar questions here about how to parse ENUM, how to parse customize JSON structure. But here my question is how to just give a better message when the user submit some JSON with is not as expected. This is the code: @PutMapping public ResponseEntity updateLimitations(@PathVariable("userId") String userId, @RequestBody LimitationParams params) { Limitations limitations = user.getLimitations(); params.getDatasets().forEach(limitations::updateDatasetLimitation); params