随笔分类 -  Mybatis

摘要:参考https://blog.csdn.net/LitongZero/article/details/83753813 注意事项:使用这样连续拼接两个注入参数时,只能用${},不能用#{}。 阅读全文
posted @ 2019-03-10 13:53 虚极静笃 阅读(267) 评论(0) 推荐(0)
摘要:这是pom.xml里的依赖: 后续再讲具体的使用 阅读全文
posted @ 2018-01-04 14:49 虚极静笃 阅读(349) 评论(0) 推荐(0)
摘要:搜索mybatis plugin并安装。 如果没有的话,就按照如下: 1. 简介 mybatis plugin作为一款优秀的mybatis跳转插件,比起free mybatis plugin插件,显示更为好看,使用也方便,此次使用的mybatis plugin v2.9.2,完美兼容IDEA 201 阅读全文
posted @ 2018-01-04 14:32 虚极静笃 阅读(17642) 评论(4) 推荐(1)
摘要:mybatis插件在这里: 然后把generatorConfig.xml文件放在resources下: 输入:datasource.properties mysql-connector-java-5.1.6-bin.jar文件不是jar包哦,注意。 如果右边没有这些: 那么选择file-settin 阅读全文
posted @ 2018-01-04 02:40 虚极静笃 阅读(751) 评论(0) 推荐(0)
摘要:mapper.xml: dao: 也就是说如果直接传Integer type是不行的,必须放在对象里面。 阅读全文
posted @ 2017-12-05 16:50 虚极静笃 阅读(814) 评论(0) 推荐(0)
摘要:: mapper.xml: 阅读全文
posted @ 2017-11-20 14:30 虚极静笃 阅读(142) 评论(0) 推荐(0)
摘要:转自:http://blog.csdn.net/yulei_qq/article/details/22039815 工程的目录结构: 有两个表,一个文章表article ,一个用户表user。 [sql] view plain copy create table article (id int(11 阅读全文
posted @ 2017-10-31 11:27 虚极静笃 阅读(923) 评论(0) 推荐(0)
摘要:所谓mybatis缓存,就是将硬盘中的数据放到内存中。尤其对于一些相同的查询语句,完全可以放在内存中,可以大大提高查询效率。 MyBatis的缓存分为两种: 阅读全文
posted @ 2017-06-14 14:06 虚极静笃 阅读(138) 评论(0) 推荐(0)