title: Call a Spring Controller from another one
body: <p>I have the URLs <code>/users</code> and <code>/users/58</code> which are handled by UserController.
  Now, I want to redirect <code>/users/58/images</code> to ImageController in order to move all code concerning Images to ImageController.</p>
  
  <p>Here is what UserController looks like:</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET, value = "/users")
  List&lt;User&gt; paginate() { ... }
  
  @RequestMapping(method = RequestMethod.GET, value = "/users/{id}")
  List&lt;User&gt; get(Long id) { ... }
  
  @RequestMapping(method = RequestMethod.GET, value = "/users/{id}/images")
  List&lt;Image&gt; images(Long userId) {
      // What I want to do is something like this
      ImageController images = new ImageController();
      return images.getByUser(userId);
  }
  </code></pre>
  
  <p>First, is that a good design? If yep, how can I call another controller from a controller?</p>