title: Convert request params to generic class
body: <p>I'm looking for help at Spring Controller definitions. I tried to google couple of times, but found no straight explanation how to acomplish my goal.</p>
  
  <p>I'd like to define generic controller:</p>
  
  <pre><code>public abstract class AbstractController&lt;E extends AbstractEntity, 
                                           P extends IRequestParams&gt; {
    @RequestMapping(method = GET)
    public @ResponseBody
    abstract List&lt;E&gt; list(@RequestParam P params);
  }
  </code></pre>
  
  <p>after that I would declare controllers like:</p>
  
  <pre><code>public class CatController 
            extends AbstractController&lt;Cat, ICatSearchParams&gt; {
    @RequestMapping(method = GET)
    public @ResponseBody
    List&lt;Cat&gt; list(@RequestParam ICatSearchParams params) {
      // do something and return list of results
    }
  }
  </code></pre>
  
  <p>I have service that transforms <code>@RequestParam Map&lt;String, String[]&gt; params</code> into <code>IRequestParams</code> in a generic way. I'm able to resolve generic type via Spring.</p>
  
  <p>But I don't know how to plug into Spring to automatically convert request params into my params interface and use it in method invocation. I would like this transformation to be transparent for developer after configuring it.</p>
  
  <p>Thank you in advance for any help!</p>