mybatis 模糊查询

方法一, 推荐
select * from user where username like CONCAT('%',#{username},'%')
方法二, 存在sql注入危险
select * from user where username like '%${username}%'

posted @ 2020-07-12 19:18  CyberPelican  阅读(145)  评论(0编辑  收藏  举报