当使用mybatis 做模糊查询时如果这样写
会报 Could not set parameters for mapping: ParameterMapping{property='keywords'
# 是起的占位符的作用,但是写在了字符串里面无法起到占位符的作用,这是我们要用 $
这里 $ 接收内容并且连接字符串,所形成的sql 就是
select id,name from tablename where name like '%关键字%'
当使用mybatis 做模糊查询时如果这样写
会报 Could not set parameters for mapping: ParameterMapping{property='keywords'
# 是起的占位符的作用,但是写在了字符串里面无法起到占位符的作用,这是我们要用 $
这里 $ 接收内容并且连接字符串,所形成的sql 就是
select id,name from tablename where name like '%关键字%'
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。