随笔分类 -  Spring Boot + Mybatis

摘要:开发工具:STS 前言: mybatis框架中最具特色的便是sql语句中的自定义,而动态sql的使用又使整个框架更加灵活。 动态sql中的语法: where标签 if标签 trim标签 set标签 switch\when标签 foreach标签 一、搭建项目 1.创建用户表: 2.添加实体: 1 p 阅读全文
posted @ 2018-07-04 12:06 零度微笑 阅读(755) 评论(0) 推荐(0)
摘要:前言: 我们知道,在mybatis中,参数取值方式有两种: #{ } 和 ${ } 下面,我们来探讨下#{ }与${ }不同。 一、#{ } 例: select * from student where name=#{name} 编译后执行的sql语句: select * from student 阅读全文
posted @ 2018-07-03 09:46 零度微笑 阅读(436) 评论(1) 推荐(0)
摘要:开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis/tree/1d30d2a573ce6784149a28af9b8afcab7414370c PageHelper官方地址:https://pagehelper.g 阅读全文
posted @ 2018-07-02 17:31 零度微笑 阅读(641) 评论(1) 推荐(1)
摘要:开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis/tree/7892801d804d2060774f3720f82e776ff318e3ba 前言: 在调用mybatis的查询条件时,之前,遇到需要验证多个参数的 阅读全文
posted @ 2018-07-02 16:02 零度微笑 阅读(4605) 评论(0) 推荐(0)
摘要:开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis/tree/3baea10a3a1104bda815c206954b2b687511aa3d 前言: 之前我们探讨了一对一、一对多的映射关系,今天我们来讨论多对多的 阅读全文
posted @ 2018-06-22 15:49 零度微笑 阅读(2787) 评论(1) 推荐(1)
摘要:开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis/tree/c00b56dbd51a1e26ab9fd990201ad9e89a770ca9 前言: 今天探讨的是Mybatis一对多的处理关系。 一个人有好多本书 阅读全文
posted @ 2018-06-20 14:58 零度微笑 阅读(3493) 评论(0) 推荐(0)
摘要:开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis01/tree/d68efe51774fc4d96e5c6870786eb3f1a1a5b629 前言: 当我们插入一个一对一、一对多、多对多的关系数据时,往往需要 阅读全文
posted @ 2018-06-19 17:26 零度微笑 阅读(1495) 评论(0) 推荐(0)
摘要:开发工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis01/tree/93398da60c647573645917b27bd549da2f9f0f15 前言: 上一篇blog里面介绍了整合springboot和myba 阅读全文
posted @ 2018-06-19 16:37 零度微笑 阅读(387) 评论(0) 推荐(0)
摘要:编译工具:STS 代码下载链接:https://github.com/theIndoorTrain/SpringBoot_Mybatis01/commit/b757cd9bfa4e2de551b2e9e5c095ded585c90566 一、项目的建立 选择依赖:Mybatis,Web,MySql, 阅读全文
posted @ 2018-06-15 17:35 零度微笑 阅读(761) 评论(4) 推荐(0)