mybatis 模糊查询like问题
映射文件中的like '%' #{symptomName} '%' 就报语法错误
<if test="symptomName != null and !"".equals(symptomName.trim())">
and symptom_name like '%' #{symptomName} '%'
</if>
Caused by: java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'name like '%' ? '%') tmp_count', expect RPAREN, actual QUES pos 174, line 6, column 39, token QUES : select count(0) from (select
symptom_code,symptom_name,synonym
from western_medicine_symptone_synonym
WHERE symptom_name like '%' ? '%') tmp_count