当使用mybatis 做模糊查询时如果这样写

Mybatis 模糊查询 like【笔记】Could not set parameters for mapping

会报 Could not set parameters for mapping: ParameterMapping{property='keywords'

Mybatis 模糊查询 like【笔记】Could not set parameters for mapping

# 是起的占位符的作用,但是写在了字符串里面无法起到占位符的作用,这是我们要用 $

Mybatis 模糊查询 like【笔记】Could not set parameters for mapping

这里 $ 接收内容并且连接字符串,所形成的sql  就是 

select id,name from tablename where name like '%关键字%'

相关文章:

  • 2022-02-22
  • 2021-04-19
  • 2021-10-30
  • 2021-09-23
猜你喜欢
  • 2021-12-21
  • 2021-06-27
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案