mybatis中对于使用like来进行模糊查询的几种方式:
(1)使用${…}
注意:由于$是参数直接注入的,导致这种写法,大括号里面不能注明jdbcType,不然会报错
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'VARCHAR' in 'class com.utry.ucsc.dao.bean.KnowledgeLibraryBean'
弊端:可能会引起sql的注入,平时尽量避免使用${...}
(2