mybatis模糊查询错误

错误信息:Could not set parameters for mapping: ParameterMapping{property=‘value’, mod…

https://www.cnblogs.com/fan-yuan/p/9299831.html

 

select * from user where name like '%${name}%'-------解析成------------select * from smbms_role where roleName like '%yuan%' 
select * from user  where name like '%#{name}%'----------解析成--------select * from smbms_role where roleName like '%?%'     ----失败

select * from user  where name like concat('%',#{name},'%')   ---可以使用字符串拼接写法

转载于:https://www.cnblogs.com/zwq20134/p/11547212.html

你可能感兴趣的:(mybatis模糊查询错误)