栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java > SpringBoot

spring boot 代码自动生成器

SpringBoot 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

spring boot 代码自动生成器

2 开始

1 创建一个spring boot 工程 添加勾选 web,mysql,mybatis 依赖

image

image

image

image

image

点击next

image

image

注: 可能有的同学会卡到这个界面 一直在resolving ,这时候 点击左上角file->close project,在进来,刷新下maven 依赖 就可以了,如下图:

image

image

image

image

2 添加maven 的pom依赖

4.0.0com.ytxstore1.0-SNAPSHOTjar1.8

    org.springframework.bootspring-boot-starter-parent1.5.10.RELEASE

        org.springframework.bootspring-boot-starter-weborg.springframework.bootspring-boot-starter-jdbcorg.springframework.bootspring-boot-starter-testtest

        org.springframework.bootspring-boot-configuration-processortrue

        commons-codeccommons-codecorg.apache.commonscommons-lang33.6com.google.guavaguava23.0

        mysqlmysql-connector-javaruntime

        org.mybatis.spring.bootmybatis-spring-boot-starter1.3.2

        tk.mybatismapper-spring-boot-starter1.1.4

        com.github.pagehelperpagehelper-spring-boot-starter1.2.2

        com.alibabafastjson1.2.44

        com.alibabadruid-spring-boot-starter1.1.6

        org.freemarkerfreemarker2.3.23testorg.mybatis.generatormybatis-generator-core1.3.5test

        dom4jdom4j1.6.1

        org.springframework.bootspring-boot-starter-data-redis

        cn.hutoolhutool-all4.1.1

        cn.jpush.apijpush-client3.3.7

        io.jsonwebtokenjjwt0.6.0org.springframework.bootspring-boot-maven-pluginmaven-compiler-plugin${java.version}${java.version}UTF-8org.apache.maven.pluginsmaven-archetype-plugin2.2aliyun-reposhttp://maven.aliyun.com/nexus/content/groups/public/falsealiyun-pluginhttp://maven.aliyun.com/nexus/content/groups/public/false

2 在src/main/java/com.generator下创建 core 目录 并拷贝一下代码到目录中:

public final class ProjectConstant {    public static final String base_PACKAGE = "com.generator";//项目基础包名称,根据自己公司的项目修改

    public static final String MODEL_PACKAGE = base_PACKAGE + ".model";//Model所在包
    public static final String MAPPER_PACKAGE = base_PACKAGE + ".dao";//Mapper所在包
    public static final String SERVICE_PACKAGE = base_PACKAGE + ".service";//Service所在包
    public static final String SERVICE_IMPL_PACKAGE = SERVICE_PACKAGE + ".impl";//ServiceImpl所在包
    public static final String CONTROLLER_PACKAGE = base_PACKAGE + ".web";//Controller所在包
    public static final String INPUT_PACKAGE=base_PACKAGE+".input";//input 所在包

    public static final String MAPPER_INTERFACE_REFERENCE = base_PACKAGE + ".core.Mapper";//Mapper插件基础接口的完全限定名}



作者:戒烟人
链接:https://www.jianshu.com/p/9962be89e2cf


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/235458.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号