<!--List<User> getUserByLike(@Param("mohu") String mohu);--><selectid="getUserByLike"resultType="User"><!--select * from t_user where username like '%${mohu}%'--><!--select * from t_user where username like concat('%',#{mohu},'%')-->
select * from t_user where username like "%"#{mohu}"%"
</select>
@TestpublicvoidtestGetUserByLike(){SqlSession sqlSession =SqlSessionUtil.getSqlSession();SpecialSQLMapper mapper = sqlSession.getMapper(SpecialSQLMapper.class);List<User> list = mapper.getUserByLike("a");
list.forEach(System.out::println);}