3. 谷粒商城初始化项目、提交到码云、初始化数据库

初始化项目

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

共同点:

  1. 全部选择依赖web、openfeign
  2. 每一个服务,包名 com.indi.gulimall.xxx(product/order/ware/coupon/member)
  3. 模块名:gulimall-xxx(product/order/ware/coupon/member)
    • 谷粒商城-商品服务:gulimall-product
    • 谷粒商城-订单服务:gulimall-order
    • 谷粒商城-仓储服务:gulimall-ware
    • 谷粒商城-优惠券服务:gulimall-coupon
    • 谷粒商城-用户服务:gulimall-member

在这里插入图片描述
在这里插入图片描述

从子项目中复制一个pom.xml到根目录下,当做父项目的pom.xml

修改成以下格式,将所有子模块聚合到其中
在这里插入图片描述

在Maven中添加父pom

在这里插入图片描述

添加完之后的结构,就是这样的
在这里插入图片描述

项目结构提交到码云

  1. 根目录的.gitignore添加以下内容,忽略以下内容提交到码云

    **/mvnw
    **/mvnw.cmd
    
    **/.mvn
    **/target/
    
    .idea
    
  2. 手动忽略5个子模块中的HELP.md,选择要忽略的文件,右键选择ignore
    在这里插入图片描述

  3. 删除子模块中的.gitignore

  4. 在idea中忽略以下文件,就看不到它们了,眼不见心不烦,也可以不忽略

    如果以前加过,则根据你要忽略的做调整,以下是我加的

    .idea;.mvn;*.iml;HELP.md;mvnw;mvnw.cmd;
    

    在这里插入图片描述

  5. 提交,最终在commit按钮后面有一个倒三角点击,里面有一个commit and push,然后就可以推送到码云上了
    在这里插入图片描述

初始化数据库

根据脚本依次创建数据库

数据库对应的微服务
订单服务gulimall_omsgulimall-order
商品服务gulimall_pmsgulimall-product
营销服务gulimall_smsgulimall-coupon
用户服务gulimall_umsgulimall-member
库存服务gulimall_wmsgulimall-ware

在这里插入图片描述
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
gulimall_pms 商品 drop table if exists pms_attr; drop table if exists pms_attr_attrgroup_relation; drop table if exists pms_attr_group; drop table if exists pms_brand; drop table if exists pms_category; drop table if exists pms_category_brand_relation; drop table if exists pms_comment_replay; drop table if exists pms_product_attr_value; drop table if exists pms_sku_images; drop table if exists pms_sku_info; drop table if exists pms_sku_sale_attr_value; drop table if exists pms_spu_comment; drop table if exists pms_spu_images; drop table if exists pms_spu_info; drop table if exists pms_spu_info_desc; /*==============================================================*/ /* Table: pms_attr */ /*==============================================================*/ create table pms_attr ( attr_id bigint not null auto_increment comment '属性id', attr_name char(30) comment '属性名', search_type tinyint comment '是否需要检索[0-不需要,1-需要]', icon varchar(255) comment '属性图标', value_select char(255) comment '可选值列表[用逗号分隔]', attr_type tinyint comment '属性类型[0-销售属性,1-基本属性,2-既是销售属性又是基本属性]', enable bigint comment '启用状态[0 - 禁用,1 - 启用]', catelog_id bigint comment '所属分类', show_desc tinyint comment '快速展示【是否展示在介绍上;0-否 1-是】,在sku中仍然可以调整', primary key (attr_id) ); alter table pms_attr comment '商品属性'; /*==============================================================*/ /* Table: pms_attr_attrgroup_relation */ /*==============================================================*/ create table pms_attr_attrgroup_relation ( id bigint not null auto_increment comment 'id', attr_id bigint comment '属性id', attr_group_id bigint comment '属性分组id', attr_sort int comment '属性组内排序', primary key (id) ); alter table pms_attr_attrgroup_relation comment '属性&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值