title: Return HashMap in mybatis and use it as ModelAttribute in spring MVC
body: <p>I want to display list of categories in my Jsp page using spring mvc @modelAttribute.</p>
  
  <p>In my mapper.xml file is </p>
  
  <pre><code>&lt;select id="selectAllCategories" resultMap="BaseResultMap"&gt;
    select id, name from categories  
  &lt;/select&gt;
  </code></pre>
  
  <p>In my Mapper.java class I have method </p>
  
  <pre><code>List&lt;Map&lt;String, String&gt;&gt; selectAllCategories();
  </code></pre>
  
  <p>I want to have a method like this:</p>
  
  <pre><code>Map&lt;Integer, String&gt;`selectAllCategories();
  </code></pre>
  
  <p>instead of <code>List&lt;Map&lt;&gt;&gt;</code>, is that possible?</p>