【无标题】

分模块开发

首先,我们需要创建一个开发模块,例如:ruoyi-outpatient:这是一个模块 第一步:在主模块的pom坐标添加到子模块

这是主模块

这是子模块:添加好坐标之后还需要把子模块的坐标名引入:如<artifactId>ruoyi-outpatient</artifactId>

第二步:在主模块<modules>标签中添加模块标签<module>如:ruoyi-outpatient<module/>

 

第三步:在主模块依赖声明标签里添加:由于这里代码太长了,不好用图片,所以就用手写了

<!--依赖声明-->

<dependencyManagement>

    <!--依赖-->

<dependencies>

<!-- 自定义模块:第三步-->

            <dependency>

                <groupId>com.ruoyi</groupId>

                <artifactId>ruoyi-outpatient</artifactId>

                <version>${ruoyi.version}</version>

            </dependency>

</dependencies>

</dependencyManagement>

第四步:在ruoyi-admin模块中添加依赖,需要在admin中引入、才会被打包到jar包中

<dependencies>

    <!-- 第四步:在admin中引用、才会被打包到jar-->

        <dependency>

            <groupId>com.ruoyi</groupId>

            <artifactId>ruoyi-outpatient</artifactId>

        </dependency>

</dependencies>

第五步:这里要在子模块中 如:ruoyi-outpatient添加若依项目需要用到公共模块,所以这里需要引入公共模块,一样的添加依赖

<dependencies>

    <!--第五步导入公共模块-->

        <!-- 通用工具-->

        <dependency>

            <groupId>com.ruoyi</groupId>

            <artifactId>ruoyi-common</artifactId>

        </dependency>

</dependencies>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值