一般情况下,我们需要返回一个List

  在Dao层定义:

List<TbAddress> selectAll();

  那么在对应的mapper文件中,应该如下:

<select id="selectAll"   resultType="com.lxl.pojo.TbAddress" >
    select  *   from tb_address </select>

  这里只需要注意的是,只需要配置返回 resultType 为List<E> 的 即可。

相关文章: