I have the following controller method for deleting some data on the server side, but I can send any value as request body which is simply ignored. Is it possible to enforce request body to be empty?
@DeleteMapping
ResponseEntity<?> delete(@RequestAttribute(USER_KEY) User user) {
service.delete(user.getId());
return ResponseEntity.ok().build();
}