
mybatis
你是我的小毛驴
这个作者很懒,什么都没留下…
展开
-
Mybatis中的#和$的区别(预编译)
Mybatis中的#和$的区别 在mybatis中有两种传递值的方法,分别是用#{xxx}和${xxx} 现有sql语句查询用户做登录,使用${xxx}的话,sql语句如下 select * from user where name = ${name} and password = ${password} 用mybatis走数据库的话,可能就是 select * from user where name = 'xiaozhu' and password = '123456' 这样看似没有问题,但是如果密原创 2020-11-07 15:13:14 · 798 阅读 · 0 评论 -
Mybatis-plus的使用和学习
Mybatis-plus的使用和学习 推荐官网学习https://baomidou.com/guide/ 1、首先准备数据 DROP TABLE IF EXISTS user; CREATE TABLE user ( id BIGINT(20) NOT NULL COMMENT '主键ID', name VARCHAR(30) NULL DEFAULT NULL COMMENT '姓名', age INT(11) NULL DEFAULT NULL COMMENT '年龄', email VARCH原创 2020-11-07 14:25:00 · 899 阅读 · 0 评论