idea自动生成代码

  1. idea安装插件

打开idea设置,查找mybatisX插件

  1. 连接数据库

打开idea右侧database

创建数据库连接

点击database后,弹出database框,点击左上角的“+”号

3.填写数据库连接信息

填写自定义名称、数据库连接地址、端口号、用户名、密码。第一次配置时,需要安装数据库驱动,填写好信息后,点击“Test Connection”测试连接是否正常

4 连接完成后可以查看数据库信息

5 生成代码

右击数据库表,选择第一个mybatis-generator

填写包路径信息,编码等点击“Next”

选择annotation:mybatis-plus3,选择是否生成注释,是否使用Lombok,template:mybatis-plus3,点击Finish,生成代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
MyBatisCodeHelper-Pro插件免费版 Features Type safe sql support, plugin can recognize mybatis dynamic sql Code Formatter Generate mybatis crud code by Intellij database table or add a database connection Generate mybatis sql based on mybatis interface method name like spring data jpa, with this, you don't have to write most sql for non join query support generate statement with if test Database generate crud could generate multiple times when you add or delete columns, plugin will auto merge code Full mybatis sql auto complete, recognize mybatis tag in xml, like where trim set include ect,provide sql completion after those tag Jump from mybatis dao interface to mapper xml each other Refactor for mybatis interface method name,refid,resultMap ect Auto complete for mybatis param,if test,foreach,resultMap,refid in sql Generate create table sql from java class Mybatis Param refactor and inspection Ognl support, if test when test ${ bind foreach collection, refactor and inspection and auto completion Jump from refid resultMap to their definition, refactor their name as well Generate page query by mapper interface method Spring support for mybatis, inject mybatis mapper to spring bean,support SpringBoot Refid,resultMap,keyProperty,property auto complete Add @param for mapper method Resultmap column complete and inspection by parse reference select statement Auto map resultMap column and property Generate mybatis mapper testcase from mybatis interface method by database connection, make you test method quicker Full inspection for mybatis, like unused sql in xml, mapper method not have sql in xml, check if resultMap property is right ect https://github.com/gejun123456/MyBatisCodeHelper-Pro to learn more. How to use view on https://github.com/gejun123456/MyBatisCodeHelper-Pro qqGroup:914051156

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

老骥伏枥279

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值