title: Spring MVC request param invalid parameter name
body: <p>I have the following method:</p>
  
  <pre><code>@RequestMapping(value = "/resource/{resourceId}", method = RequestMethod.GET)
  @ResponseStatus(value = HttpStatus.OK)
  public @ResponseBody
  ResourceDto getChannelById(@PathVariable Long resourceId, QueryParameters queryParameters) {
      ...
  }
  </code></pre>
  
  <p>Which I can call this way:</p>
  
  <blockquote>
    <p>GET localhost:8080/someName/resources/1?attr1=1</p>
  </blockquote>
  
  <p>And attr1 is correctly binded in the QueryParameters object.</p>
  
  <p>I would like to recognize when the call is made with an unknown attribute(attribute not present in the QueryParameters class):</p>
  
  <blockquote>
    <p>GET localhost:8080/someName/resources/1?attr1=1&amp;attrUnknown=2</p>
  </blockquote>
  
  <p>And throw an error. Is possible to recognize an attribute that is not present in the object?</p>
  
  <p>Edit:
  Relevant part of the QueryParameters</p>
  
  <blockquote>
    <p>private List expand = new ArrayList&lt;>();
    getters and setters...</p>
  </blockquote>