zoukankan      html  css  js  c++  java
  • spring cloud学习笔记---02各个微服务模块创建

    创建各个微服务模块

    商品服务、仓储服务、订单服务、优惠券服务、用户服务

    每个模块的共同点:
    - 1、每个模块都包含 webOpenFeign
    - 2、每个服务的包名都统一为:top.mgy.gulimall.xxx(xxx表示模块名称,如product/order/ware/coupon/member)
    - 3、模块名称统一为:gulimall-xxx(xxx表示服务名称 如:gulimall-product)

    创建好的模块如下图:

    设置gitigonre文件

    将下面的文件忽略

    **/mvnw
    **/mvnw.cmd
    **/.mvn
    **/target
    .idea
    **/.gitignore
    

    gulimall项目设置为聚合父项目

    修改其pom文件.设置为聚合父项目后,每次打包或者编译执行mvn命令都会对所有子模块生效

    <?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>top.mgy.gulimall</groupId>
        <artifactId>gulimall</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <name>gulimall</name>
        <description>聚合服务</description>
        <packaging>pom</packaging>
    
        <modules>
            <module>gulimall-coupon</module>
            <module>gulimall-member</module>
            <module>gulimall-order</module>
            <module>gulimall-product</module>
            <module>gulimall-ware</module>
        </modules>
    </project>
    
  • 相关阅读:
    C. Karen and Game
    BZOJ2134: 单选错位
    BZOJ3562: [SHOI2014]神奇化合物
    BZOJ1084: [SCOI2005]最大子矩阵
    BZOJ5039: [Jsoi2014]序列维护
    BZOJ1798: [Ahoi2009]Seq 维护序列seq
    BZOJ3932: [CQOI2015]任务查询系统
    BZOJ3339: Rmq Problem
    BZOJ3585: mex
    BZOJ4196: [Noi2015]软件包管理器
  • 原文地址:https://www.cnblogs.com/maguangyi/p/14111825.html
Copyright © 2011-2022 走看看