通常狀況下,咱們須要返回一個Listapp
在Dao層定義:spa
List<TbAddress> selectAll();
那麼在對應的mapper文件中,應該以下:code
<select id="selectAll" resultType="com.lxl.pojo.TbAddress" > select * from tb_address </select>
這裏只須要注意的是,只須要配置返回 resultType 爲List<E> 的 便可。blog