title: How to return multiple @ModelAttribute in spring annotated controllers?
body: <p>I am in the middle of converting my controllers to annotated style controllers in spring mvc.</p>
  
  <p>Basically I do this in the old style controller simpleformcontroller.</p>
  
  <pre><code>protected Map referenceData(HttpServletRequest request) throws Exception
  {
      Map referenceData = new HashMap();
  
      List&lt;ItemVo&gt; lstItem1 = eqrManager
          .searchAllEqptCondQualItems("A1", "BOXES");
      List&lt;ItemVo&gt; lstItem2 = eqrManager
          .searchAllEqptFullQualItems("A2", "CANNED_GOODS");
      referenceData.put("BOX_ITEMS", lstItem1);
      referenceData.put("CANNED_ITEMS", lstItem2);
      return referenceData;
  }
  </code></pre>
  
  <p>In the annotated, I do something like this:</p>
  
  <pre><code>@ModelAttribute("BOX_ITEMS")
  public List&lt;ItemVo&gt; populateCondEQRItems() {
      List&lt;ItemVo&gt; lstCondQual = eqrManager
              .searchAllEqptCondQualItems("A1", "BOXES");
      return lstCondQual;
  }
  
  @ModelAttribute("CANNED_ITEMS")
  public List&lt;ItemVo&gt; populateFullEQRItems() {
      List&lt;ItemVo&gt; lstFullQual = eqrManager
              .searchAllEqptFullQualItems("A2", "CANNED_GOODS");
      return lstFullQual;
  }
  </code></pre>
  
  <p>My question is, is there a way to return all attributes in just a single method and not
  having to create multiple @ModelAttribute?  In my case, I need to annotate 2 method?  What if I need
  3, should I create 3 annotated methods also?</p>