mybatis
蓝胖子(liaocan.top)
只有坚持,勇敢,专注和定力才能收获自己的的一片天空,个人博客网站 https://liaocan.top
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mybatis中resultMap,resultType,parameterType ,parameterMap
resultMap,resultType 封装结果集 resultMap 推荐 表示将查询结果集中的列一一映射到bean对象的各个属性。映射的查询结果集中的列标签可以根据需要灵活变化,并且,在映射关系中,还可以通过typeHandler设置实现查询结果值的类型转换,比如布尔型与0/1的类型转换。 CLOb的转换等 <resultMap type="hdu.terence.bean.Me...原创 2019-01-23 17:49:04 · 1482 阅读 · 1 评论 -
mybatis调用存储过程-oracle
1.输入输出参数 <select id="checkingProcess" parameterMap="checkingParaMap" statementType="CALLABLE"> CALL P_CHECKING(?,?,?,?,?) </select> <select id="cancelCheck" parameterType="原创 2019-01-23 17:50:38 · 1080 阅读 · 0 评论 -
Mybatis的@Param注解的用法
dao层示例 Public User selectUser(@param(“userName”) String name,@param(“userpassword”) String password); xml映射对应示例 <select id=" selectUser" resultMap="BaseResultMap"> select * from user_use...原创 2019-01-23 17:51:27 · 813 阅读 · 0 评论 -
mybatis中collecton标签的两种使用方式区别
第一种:查询多次,查询部门的时候会根据部门的编号去查询部门下的高基表 n+1 <resultMap id="ClassifyVOResultMap" type="com.ly.business.entity.highbasetable.ClassifyVO"> <id column="GJBBH" jdbcType="VARCHAR" property="link"原创 2019-01-23 17:52:33 · 1411 阅读 · 0 评论 -
mybatis逆向生成工具
mybatis-generator.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/...原创 2019-01-23 17:53:28 · 643 阅读 · 0 评论 -
mybatis模糊查询的几种写法 bind concat等
0. 好像不行。。 AND address LIKE "%"#{address}"%" 1.LIKE CONCAT(CONCAT('%', ?), '%') 预编译 使用占位符 AND address LIKE CONCAT(CONCAT('%',#{address},'%')) CONCAT(CONCAT('%',#{zdmc,jdbcType=VARCHAR},'%'))) 不需...原创 2019-01-23 17:54:23 · 1815 阅读 · 0 评论 -
mybatis获取oracle中的clob,long类型字段映射
long字段 <!-- 接口数据库用户的视图信息 --> <resultMap id="viewsResultMap" type="com.ly.business.entity.servicemanager.ViewsInfoEntity"> <result property="styj" column="TEXT" /> //需要放在最前原创 2019-01-23 17:55:37 · 3343 阅读 · 0 评论 -
Springboot2.0从零开始搭建脚手架(一)-初始化和整合MybatisPlus3.0+
初始化springboot项目 添加web依赖,基于springboot2.1.3稳定版本 初始化spring boot项目地址 https://start.spring.io/ 包名:com.nqmysb.scaffold 导入IDE 下载项目,我这里使用eclipse ,导入eclipse之后如下图 编写控制器 写一个控制器,并启动查看结果,这里直接将controller写在入口类 @Re...原创 2019-04-07 13:29:09 · 3495 阅读 · 3 评论
分享