Mybatis 插件、利器、骚操作
2019-06-11 本文已影响37人
黄靠谱
- Xml热加载,这个牛逼(告别重启)
参考这个,SpringBoot版本的
https://blog.csdn.net/angry_mills/article/details/80565863
我写了给Demo,xml_hot_swap 分支的代码
https://github.com/huangzhenshi/demo-ssm
但是要注意:IDEA中,扫描的是 target下面的mapper.xml,所以和java文件一样,每次修改完mapper文件,要Ctrl+F9编译一下才会触发 hot-swap
-
Mybatis-Plugin(idea 插件)(开源,直接安装就完事了)
https://blog.csdn.net/xyphf/article/details/81257554 -
MybatisX (idea插件,可以根据mapper里面的方法,直接生成 xml里面格式的SQL描述)
https://mp.baomidou.com/guide/mybatisx-idea-plugin.html#%E5%8A%9F%E8%83%BD -
Mybatis-Plus(开发利器)
无侵入、简化代码、
集成了Mybatis-Generator和PageHelper的功能 -
Mybatis-Generator
-
PageHelper
-
Mybatis Mapper文件里面用 @select 注解也很方便,不需要写 xml里面的sql了