@Select("select * from user where username like #{name}")
注意:在测试类中别忘记加% ("%xiao%") 如下所示
List<User> name = userDao.findByName("%xiao%");
1.2 模糊查询第二种写法
@Select("select * from user where username like '%${value}%'")
注意:
1. 上面括号中的value为固定写法,不能改,比如写成value1就会报错
2. 在测试类中不需要加%,如下所示,不常用写法
List<User> name = userDao.findByName("xiao");