Mybatis--->模糊查询

  <select id="queryBookByName" resultType="Books">
        select * from ssmbuild.books where bookName like CONCAT('%',#{bookName},'%')
    </select>

CONCAT('%',#{bookName},'%'     推荐

原文地址:https://www.cnblogs.com/springxian/p/13751515.html