Spring boot uses annotations for fuzzy queries


Mybatis uses annotations to perform fuzzy queries in spring boot

@Select ("select * from dept where dname like CONCAT ('%', # {dname}, '%') ")

public List <Dept> getDeptByLikeDname (@Param (value = " dname ") String dname);

 

 

Guess you like

Origin www.cnblogs.com/caoxinfang/p/12756306.html