摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 1、limit 分页 # limit 语法 SELECT * FROM table LIMIT stratIndex,pageSize SELECT * FROM table LIMIT 5,10; // 阅读全文
posted @ 2020-09-03 16:38 卡文迪雨 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 MyBatis 的配置文件包含了会深深影响 MyBatis 行为的设置和属性信息。 配置文档的顶层结构如下: configuration(配置) properties(属性) settings(设置) t 阅读全文
posted @ 2020-09-03 16:35 卡文迪雨 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 动态 SQL,是指通过 MyBatis 提供的各种标签对条件作出判断以实现动态拼接 SQL 语句。 这里的条件判 断使用的表达式为 OGNL 表达式。 常用的动态 SQL 标签有 <if>、<where> 阅读全文
posted @ 2020-09-03 16:33 卡文迪雨 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 MyBatis 的真正强大在于它的映射语句,也是它的魔力所在。由于它的异常强大,映射器的 XML 文件就显得相对简单。如果拿它跟具有相同功能的 JDBC 代码进行对比,你会立即发现省掉了将近 95% 的代 阅读全文
posted @ 2020-09-03 16:31 卡文迪雨 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 1、MyBatis 传统 Dao 开发方式 之前的 selectStudents() 是这样实现的,代码如下: @Test public void testStart() throws IOExcepti 阅读全文
posted @ 2020-09-03 16:29 卡文迪雨 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 @Test public void testStart() throws IOException { // 1.mybatis 主配置文件 String config = "mybatis-config. 阅读全文
posted @ 2020-09-03 16:27 卡文迪雨 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 实现步骤总结: Maven 工程中导入 MyBatis 和 MySQL 的依赖 创建实体类,推荐类名和表名一致,该类的对象用于对应表的一行数据 创建持久层的 dao 接口(也可以称为持久层的 mapper 阅读全文
posted @ 2020-09-03 16:26 卡文迪雨 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 1、JDBC 编程 1.1、传统 JDBC 的使用 public void findStudent() { Connection conn = null; Statement stmt = null; R 阅读全文
posted @ 2020-09-03 16:25 卡文迪雨 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 学习资源:动力节点《2020最新MyBatis教程【IDEA版】-MyBatis从入门到精通》 1、Java 开发常用结构 1.1、三层架构 三层架构包含的三层: 界面层(User Interface layer) 业务逻辑层(Business Logic Layer) 数据访问层(Data acc 阅读全文
posted @ 2020-09-03 16:23 卡文迪雨 阅读(270) 评论(0) 推荐(0) 编辑