模糊匹配
<select id="findByName" parameterType="string" resultType="Student">
select * from student where student.name like "%"#{name}"%";
<select>
正则
<select id="findByName" parameterType="string" resultType="Student">
select * from student where student.name REGEXP "^["#{name}"]"
</select>
本文转自 matengbing 51CTO博客,原文链接:http://blog.51cto.com/matengbing/1869955