在MyBatis开发中模糊查询的mapper.xml中一开始我是这样查询的
select * from table where name like concat('%',#{text},'%')
这样是不对的,正确的方法应该是使用字符拼接
select * from table where name like concat(concat('%',#{text}),'%')
或者使用${}代替#{}
select * from table where name like'%${text}%'