1.上一集我们拉下来的项目作为总项目,然后把各微服务模块创建到此项目里面

以商品服务举例,如下

谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云

谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云 选择以下两大组件 web不用多说,feign是用于微服务之间的调用

谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云

 谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云

然后再以相同方式创建其它四个子模块,订单,仓储,会员,促销

 2.在总项目中添加pom文件,文件内容替换为如下 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.atguigu.gulimall</groupId>
    <artifactId>gulimall</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>gulimall</name>
    <description>聚合服务</description>
    <packaging>pom</packaging>

    <modules>
        <module>gulimall-ware</module>
        <module>gulimall-coupon</module>
        <module>gulimall-member</module>
        <module>gulimall-order</module>
        <module>gulimall-product</module>

    </modules>

</project>

3.profiles里添加gulimall

谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云

 4.修改父工程的gitignore文件

在里面添加如下内容,使得如下内容不会被版本控制

**/mvnw
**/mvnw.cmd

**/.mvn
**/target/

.idea
**/.gitignore

5.加入版本控制

谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云 

6.提交到码云

谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云 

添加注释并把右侧两个√去掉,分别是代码分析与检查todo项,这里我们不需要

  谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云

第一次我push报错Remote: [31mYou do not have permission push to this repository[0m unable to access 'https://gitee.com/feng_bu_jue/gulimall.git/': The requested URL returned error: 403

后面发现是码云主邮箱设置问题,默认的主油箱是一个奇怪的,需要手动改为之前你git内配置的提交邮箱

7.最后刷新码云就可以在仓库看见提交的内容了

谷粒商城day10-springboot微服务项目初始结构创建以及提交到码云

相关文章:

  • 2021-06-03
  • 2021-12-28
  • 2022-01-14
  • 2021-11-23
  • 2021-10-05
  • 2021-10-17
猜你喜欢
  • 2021-10-22
  • 2021-11-01
  • 2021-08-04
  • 2022-01-12
  • 2021-11-14
  • 2021-12-18
相关资源
相似解决方案