There are fuzzy query Mybatis in two ways: (recommend the first)
-
When Java code that executes pass the wildcard %%
List<User> userList=mapper.getUserLike("%李%");
-
Use wildcards in sql mosaic!
select * from mybatis.user where name like "%"#{value}"%"