Spring ResponseEntity and forward
问题 Im a SpringBoot application have a REST controller that handles several cases and one of these cases it must forward to another controller. @PutMapping( value = "/rest/endpoint", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public ResponseEntity<CustomObject> doPut(@RequestBody myDataToBeHandled) { if(caseAHolds(myDataToBeHandled){ return new ResponseEntity<>(null, HttpStatus.BAD_REQUEST); } else if(caseBHolds(myDataToBeHandled){