模糊匹配
<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” 博客,请务必保留此出处http://matengbing.blog.51cto.com/11395502/1869955
原文地址:http://matengbing.blog.51cto.com/11395502/1869955