文档: https://mybatis.org/mybatis-3/zh/index.html

mapper文件: 存储dao类中执行时的sql语句

resultType: …

updata student set sex = #{sex} where id = #{id}

select * from student order by id ‘desc’

{}:为占位符
${}:为拼接符

{}:为参数占位符?,即sql预编译,替换变量时,会对对应的变量自动加上 ‘’
${}为字符串替换, 即字符串拼接,替换变量时,不会对对应的变量加上’’