在MyBatis中采用模糊查询变量的引用标志应当是$而不是#

具体如下例:

    @Select("select count(*) from hy_stock where name like '%${keyword}%' or code like '%${keyword}%' ")
    int getPagedSearchCount(@Param("keyword") String keyword);

--2020-04-30--

原文地址:https://www.cnblogs.com/heyang78/p/12808253.html