I want to apply "stern" strategy on my rest api endpoint (https://stackoverflow.com/a/20597044/4828427). As parameter i am not using JsonObject but MyObject.
@RequestMapping(value = "/api/v1/authenticate", method = RequestMethod.POST)
public ResponseEntity<TokenDTO> createAuthenticationToken(@RequestBody JwtRequest authenticationRequest) {
So i let spring deserializate json to object and i am using object dirrectly. Example:
authenticationRequest.getUsername();
I am looking for some Utils or annotations to detect if there are any unused json elements in request or not to handle it with proper warning handler.