I have a controller:
@Controller
@RequestMapping("/player")
public class PlayerController extends AbstractController {
@RequestMapping(value = "/doSomething", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.OK)
@ResponseBody
public int doSomeThing(@RequestBody SomeDTO someDTO , HttpServletRequest request) throws IOException {
this.playerService.doSomething(
someDTO );
return SERVER_OK;
}
// Tons of similar methods here
}
I would like to create a filter that will intercept all the calls to this controller and will have access to the @RequestBody
Object object that each of these methods receives. I would like to manipulate this @RequestBody
object.
Is that possible?