在mybatis接口mapper文件中引用传入的参数是通过#{param}或者${param}来使用的。至于mybatisl中#{}和${}的区别其实很简单,但是之前一直没有理解清楚,网上一堆错误的理解。所以在这里记录一下其实这个问题很简单。select * from t_user where name = #{param}使用#{}就等于使用了PrepareStatement这种占位符的形式。可
转载 精选 2015-10-23 15:26:35
255阅读
代码已提交至Github,有兴趣的同学可以下载来看看:https://github.com/ylw-github/SpringBoot-DB-Demo本文目录结构:l____1. SpringBoot整合JdbcTemplatel_______1.1 单元测试方法l____2. SpringBoot整合MyBatisl____3. SpringBoot整合SpringJPAl____4...
原创 2021-07-06 15:21:53
104阅读