美文网首页springboot
Intellij IDEA 中使用 MyBatis-genera

Intellij IDEA 中使用 MyBatis-genera

作者: BrightHeart | 来源:发表于2018-08-15 18:00 被阅读439次

1.在maven项目的pom.xml 添加mybatis-generator-maven-plugin 插件和MySQL数据库驱动依赖

2.在maven项目下的src/main/resources 目录下建立名为 generatorConfig.xml的配置文件,作为mybatis-generator-maven-plugin 插件的执行目标,模板如下:


3.使用maven运行mybatis-generator-maven-plugin插件:工程名->Plugins->mybatis-generator->mybatis-generator:generate->Run Maven Build


4.自动生成的结构如下:


相关文章

网友评论

    本文标题:Intellij IDEA 中使用 MyBatis-genera

    本文链接:https://www.haomeiwen.com/subject/sxowbftx.html