![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis
tcoding
这个作者很懒,什么都没留下…
展开
-
mybatis使用笔记(一)
1 关系 配置是注意顺序 result ——->association———>collection 2 resultMap 很灵活,一个namespace下可以有多个resultMap,不同namespace下的resultMap可以互相使用 3 枚举 < result column="type" property="type" typeHandler="o...原创 2018-04-24 17:16:12 · 186 阅读 · 0 评论 -
mybatis配置注意事项
文章目录mybatis配置注意事项resultMap配置顺序使用枚举类型 mybatis配置注意事项 ##mybatis-config.xml 注意配置节点顺序 properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,plugins?,environments? ,database...原创 2018-09-29 14:41:06 · 224 阅读 · 0 评论 -
mybatis insert之后返回主键id
mybatis insert之后返回主键id 注意 dao 层添加方法不要加 @Param() 注解 mybatis insert标签没有resultType属性不能直接返回主键id 需要以下的方式获取 Info info = new Info(); demoDao.insert(info); System.out.println(info.getId()); 自増方式返回id &l...原创 2018-12-26 16:50:31 · 410 阅读 · 0 评论 -
Mybatis-Plus使用笔记(SpringBoot版)
Mybatis-Plus使用笔记(SpringBoot版) 配置 启动类上配置@MapperScan扫描mapper接口 application.yml mybatis-plus: #配置文件配置在mybatis-plus mapper-locations: classpath:mapper/**/*Mapper.xml # 存放映射mapper文件 扫描Mapper.xml结尾的文件 ...原创 2019-01-09 17:00:56 · 297 阅读 · 0 评论