摘要:
一种直接采用函数进行模糊查询,直接在映射文件中书写对应的like语句。例如:select * from u_tree ut where ut.node_name like concat(concat(‘%',#{text}),’%')第二种方式:使用 ${...} 代替 #{...}SELECT * FROM tableName WHERE name LIKE '%${text}%';第三种方式:3. 程序中拼接Java// or String searchText = "%" + text + "%";String se 阅读全文