本文内容来自上硅谷
如果dao如下
public List<Employee> getEmpsByLastNameLike(String lastName);
则xml配置如下
<!--resultType:如果返回的是一个集合,要写集合中元素的类型 -->
<select id="getEmpsByLastNameLike" resultType="com.atguigu.mybatis.bean.Employee">
select * from tbl_employee where last_name like #{lastName}
</select>