1.补充

1.1嵌套路由(补充)

一旦使用了嵌套路由,必须有某个View是不完整的(其内部有某个区域使用了<router-view/>,是由其它View来负责显示的),这样的View不应该能够被直接访问,所以,通常会配置上redirect 属性,表示“重定向”的意思,一旦访问这个View对应的路径,就会自动跳转到重定向配置的路径上,例如:

const routes = [{path: '/sys-admin',component: () => import('../views/HomeView.vue'),redirect: '/sys-admin/index',  // 重定向// 其它代码

另外,在使用了嵌套路由时,通常,设计的子级路由中的URL会有共同的前缀,例如:

const routes = [{path: '/sys-admin',component: () => import('../views/HomeView.vue'),redirect: '/sys-admin/index',children: [{// 以下路径使用了 /sys-admin 作为前缀path: '/sys-admin/temp/brand/list',component: () => import('../views/sys-admin/temp/BrandListView.vue')},{// 以下路径使用了 /sys-admin 作为前缀path: '/sys-admin/temp/brand/add-new',component: () => import('../views/sys-admin/temp/BrandAddNewView.vue')},

则,在配置子级路径的path时,可以不使用/作为第1个字符,然后,配置值只需要写/sys-admin右侧的部分,例如:

const routes = [{path: '/sys-admin',component: () => import('../views/HomeView.vue'),redirect: '/sys-admin/index',children: [{// 实际路径是父级路由的path与当前path的组合:/sys-admin/temp/brand/listpath: 'temp/brand/list',component: () => import('../views/sys-admin/temp/BrandListView.vue')},{// 实际路径是父级路由的path与当前path的组合:/sys-admin/temp/brand/add-newpath: 'temp/brand/add-new',component: () => import('../views/sys-admin/temp/BrandAddNewView.vue')},

2.酷鲨商城(管理商品模块)

此项目是《酷鲨商城》的服务器端管理商品相关数据的项目(至于管理员、用户、订单等,并不在此项目中开发)。

此项目是使用Spring Boot作为基础框架的项目,在后续的使用过程中,将使用到主流的SSM(Spring / Spring MVC / Mybatis)、Spring Security、Spring Validation等框架。

早期流行的是SSH:Spring / Struts 2 / Hibernate

创建项目的参数:

  • Group:cn.tedu
  • Artifact:csmall-product
  • Package Name:cn.tedu.csmall.product
  • Java版本:1.8
  • Spring Boot父项目版本:2.5.9
  • 创建过程中勾选的依赖:无

创建项目完成后,pom.xml文件的内容为:

<?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><!-- 父级项目版本,推荐暂时使用2.5.9 --><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.5.9</version><relativePath/> <!-- lookup parent from repository --></parent><!-- 当前项目信息 --><groupId>cn.tedu</groupId><artifactId>csmall-product</artifactId><version>0.0.1</version><name>jsd2204-csmall-product-teacher</name><description>这是酷鲨商城的商品管理服务的项目(学习中……)</description><!-- 属性 --><properties><!-- 使用的Java的版本 --><java.version>1.8</java.version></properties><!-- 当前项目使用的依赖项(框架、工具包) --><!-- scope > test:此依赖项的作用范围只是测试,仅能用于src/test下的代码,且不参与编译、打包 --><dependencies><!-- Spring Boot的基础依赖项 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId></dependency><!-- Spring Boot的测试的依赖 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies></project>

2.1项目的开发流程

推荐学习《软件工程》。

大概的指导思想,开发项目的核心流程:需求分析、可行性分析、总体设计、详细设计等。

在开发实践中,每个用户感受到的功能(例如登录、注册等)都是由项目中的多个组件(例如Controller、Mapper等)来共同完成的,通常,在开发时,首先确定需要开发的数据类型有哪些,例如用户、类别、购物车、订单等,并且,从基础类型开始制定开发顺序,例如需要先开发用户类型的数据的相关功能,才能开发订单数据的相关功能,然后,对于互不直接相关的数据类型,一般先开发简单的,再开发难度略大的,接下来,就应该规划每种数据类型需要实现哪些业务(用户能感受到的功能),以用户数据为例,需要开发的业务可能有:登录、注册、修改密码、查看用户列表、禁用某用户、删除用户……并规划这些业务的开发先后顺序,通常,应该大致遵循增、查、删、改的顺序,例如需要先开发注册,再开发登录……然后,在每个业务的开发过程中,应该先开发数据访问功能(增删改查)、业务逻辑层、控制器、页面。

2.2关于数据库与数据表

创建数据库mall_pms(Product Management System):

CREATE DATABASE mall_pms;

然后,在IntelliJ IDEA中配置Database面板,并在Console中执行以下SQL: id

-- 数据库:mall_pms-- 相册表:创建数据表
drop table if exists pms_album;
create table pms_album
(id           bigint unsigned auto_increment comment '记录id',name         varchar(50)      default null comment '相册名称',description  varchar(255)     default null comment '相册简介',sort         tinyint unsigned default 0 comment '自定义排序序号',gmt_create   datetime         default null comment '数据创建时间',gmt_modified datetime         default null comment '数据最后修改时间',primary key (id)
) comment '相册' charset utf8mb4;-- 相册表:为相册名称字段添加索引
create index idx_album_name on pms_album (name);-- 图片表:创建数据表
drop table if exists pms_picture;
create table pms_picture
(id           bigint unsigned auto_increment comment '记录id',album_id     bigint unsigned   default null comment '相册id',url          varchar(255)      default null comment '图片url',description  varchar(255)      default null comment '图片简介',width        smallint unsigned default null comment '图片宽度,单位:px',height       smallint unsigned default null comment '图片高度,单位:px',is_cover     tinyint unsigned  default 0 comment '是否为封面图片,1=是,0=否',sort         tinyint unsigned  default 0 comment '自定义排序序号',gmt_create   datetime          default null comment '数据创建时间',gmt_modified datetime          default null comment '数据最后修改时间',primary key (id)
) comment '图片' charset utf8mb4;-- 品牌表:创建数据表
drop table if exists pms_brand;
create table pms_brand
(id                     bigint unsigned auto_increment comment '记录id',name                   varchar(50)      default null comment '品牌名称',pinyin                 varchar(50)      default null comment '品牌名称的拼音',logo                   varchar(255)     default null comment '品牌logo的URL',description            varchar(255)     default null comment '品牌简介',keywords               varchar(255)     default null comment '关键词列表,各关键词使用英文的逗号分隔',sort                   tinyint unsigned default 0 comment '自定义排序序号',sales                  int unsigned     default 0 comment '销量(冗余)',product_count          int unsigned     default 0 comment '商品种类数量总和(冗余)',comment_count          int unsigned     default 0 comment '买家评论数量总和(冗余)',positive_comment_count int unsigned     default 0 comment '买家好评数量总和(冗余)',enable                 tinyint unsigned default 0 comment '是否启用,1=启用,0=未启用',gmt_create             datetime         default null comment '数据创建时间',gmt_modified           datetime         default null comment '数据最后修改时间',primary key (id)
) comment '品牌' charset utf8mb4;-- 品牌表:为品牌名称字段添加索引
create index idx_brand_name on pms_brand (name);-- 类别表:创建数据表
drop table if exists pms_category;
create table pms_category
(id           bigint unsigned auto_increment comment '记录id',name         varchar(50)      default null comment '类别名称',parent_id    bigint unsigned  default 0 comment '父级类别id,如果无父级,则为0',depth        tinyint unsigned default 1 comment '深度,最顶级类别的深度为1,次级为2,以此类推',keywords     varchar(255)     default null comment '关键词列表,各关键词使用英文的逗号分隔',sort         tinyint unsigned default 0 comment '自定义排序序号',icon         varchar(255)     default null comment '图标图片的URL',enable       tinyint unsigned default 0 comment '是否启用,1=启用,0=未启用',is_parent    tinyint unsigned default 0 comment '是否为父级(是否包含子级),1=是父级,0=不是父级',is_display   tinyint unsigned default 0 comment '是否显示在导航栏中,1=启用,0=未启用',gmt_create   datetime         default null comment '数据创建时间',gmt_modified datetime         default null comment '数据最后修改时间',primary key (id)
) comment '类别' charset utf8mb4;-- 类别表:为类别名称字段添加索引
create index idx_category_name on pms_category (name);-- 品牌类别关联表:创建数据表
drop table if exists pms_brand_category;
create table pms_brand_category
(id           bigint unsigned auto_increment comment '记录id',brand_id     bigint unsigned default null comment '品牌id',category_id  bigint unsigned default null comment '类别id',gmt_create   datetime        default null comment '数据创建时间',gmt_modified datetime        default null comment '数据最后修改时间',primary key (id)
) comment '品牌与类别关联' charset utf8mb4;-- 属性表:创建数据表
drop table if exists pms_attribute;
create table pms_attribute
(id                 bigint unsigned auto_increment comment '记录id',template_id        bigint unsigned  default null comment '所属属性模版id',name               varchar(50)      default null comment '属性名称',description        varchar(255)     default null comment '简介(某些属性名称可能相同,通过简介补充描述)',type               tinyint unsigned default 0 comment '属性类型,1=销售属性,0=非销售属性',input_type         tinyint unsigned default 0 comment '输入类型,0=手动录入,1=单选,2=多选,3=单选(下拉列表),4=多选(下拉列表)',value_list         varchar(255)     default null comment '备选值列表',unit               varchar(50)      default null comment '计量单位',sort               tinyint unsigned default 0 comment '自定义排序序号',is_allow_customize tinyint unsigned default 0 comment '是否允许自定义,1=允许,0=禁止',gmt_create         datetime         default null comment '数据创建时间',gmt_modified       datetime         default null comment '数据最后修改时间',primary key (id)
) comment '属性' charset utf8mb4;-- 属性模版表:创建数据表
drop table if exists pms_attribute_template;
create table pms_attribute_template
(id           bigint unsigned auto_increment comment '记录id',name         varchar(50)      default null comment '属性模版名称',pinyin       varchar(50)      default null comment '属性模版名称的拼音',keywords     varchar(255)     default null comment '关键词列表,各关键词使用英文的逗号分隔',sort         tinyint unsigned default 0 comment '自定义排序序号',gmt_create   datetime         default null comment '数据创建时间',gmt_modified datetime         default null comment '数据最后修改时间',primary key (id)
) comment '属性模版' charset utf8mb4;-- 属性模版表:为属性模版名称字段添加索引
create index idx_attribute_template_name on pms_attribute_template (name);-- 类别与属性模版关联表:创建数据表
drop table if exists pms_category_attribute_template;
create table pms_category_attribute_template
(id                    bigint unsigned auto_increment comment '记录id',category_id           bigint unsigned default null comment '类别id',attribute_template_id bigint unsigned default null comment '属性模版id',gmt_create            datetime        default null comment '数据创建时间',gmt_modified          datetime        default null comment '数据最后修改时间',primary key (id)
) comment '类别与属性模版关联' charset utf8mb4;-- SPU(Standard Product Unit)表:创建数据表
drop table if exists pms_spu;
create table pms_spu
(id                     bigint unsigned not null comment '记录id',name                   varchar(50)      default null comment 'SPU名称',type_number            varchar(50)      default null comment 'SPU编号',title                  varchar(255)     default null comment '标题',description            varchar(255)     default null comment '简介',list_price             decimal(10, 2)   default null comment '价格(显示在列表中)',stock                  int unsigned     default 0 comment '当前库存(冗余)',stock_threshold        int unsigned     default 0 comment '库存预警阈值(冗余)',unit                   varchar(50)      default null comment '计件单位',brand_id               bigint unsigned  default null comment '品牌id',brand_name             varchar(50)      default null comment '品牌名称(冗余)',category_id            bigint unsigned  default null comment '类别id',category_name          varchar(50)      default null comment '类别名称(冗余)',attribute_template_id  bigint unsigned  default null comment '属性模版id',album_id               bigint unsigned  default null comment '相册id',pictures               varchar(500)     default null comment '组图URLs,使用JSON数组表示',keywords               varchar(255)     default null comment '关键词列表,各关键词使用英文的逗号分隔',tags                   varchar(255)     default null comment '标签列表,各标签使用英文的逗号分隔,原则上最多3个',sales                  int unsigned     default 0 comment '销量(冗余)',comment_count          int unsigned     default 0 comment '买家评论数量总和(冗余)',positive_comment_count int unsigned     default 0 comment '买家好评数量总和(冗余)',sort                   tinyint unsigned default 0 comment '自定义排序序号',is_deleted             tinyint unsigned default 0 comment '是否标记为删除,1=已删除,0=未删除',is_published           tinyint unsigned default 0 comment '是否上架(发布),1=已上架,0=未上架(下架)',is_new_arrival         tinyint unsigned default 0 comment '是否新品,1=新品,0=非新品',is_recommend           tinyint unsigned default 0 comment '是否推荐,1=推荐,0=不推荐',is_checked             tinyint unsigned default 0 comment '是否已审核,1=已审核,0=未审核',check_user             varchar(50)      default null comment '审核人(冗余)',gmt_check              datetime         default null comment '审核通过时间(冗余)',gmt_create             datetime         default null comment '数据创建时间',gmt_modified           datetime         default null comment '数据最后修改时间',primary key (id)
) comment 'SPU(Standard Product Unit)' charset utf8mb4;-- SPU详情表:创建数据表
drop table if exists pms_spu_detail;
create table pms_spu_detail
(id           bigint unsigned auto_increment comment '记录id',spu_id       bigint unsigned default null comment 'SPU id',detail       text            default null comment 'SPU详情,应该使用HTML富文本,通常内容是若干张图片',gmt_create   datetime        default null comment '数据创建时间',gmt_modified datetime        default null comment '数据最后修改时间',primary key (id)
) comment 'SPU详情' charset utf8mb4;-- SKU(Stock Keeping Unit)表:创建数据表
drop table if exists pms_sku;
create table pms_sku
(id                     bigint unsigned not null comment '记录id',spu_id                 bigint unsigned  default null comment 'SPU id',title                  varchar(255)     default null comment '标题',bar_code               varchar(255)     default null comment '条型码',attribute_template_id  bigint unsigned  default null comment '属性模版id',specifications         varchar(2500)    default null comment '全部属性,使用JSON格式表示(冗余)',album_id               bigint unsigned  default null comment '相册id',pictures               varchar(500)     default null comment '组图URLs,使用JSON格式表示',price                  decimal(10, 2)   default null comment '单价',stock                  int unsigned     default 0 comment '当前库存',stock_threshold        int unsigned     default 0 comment '库存预警阈值',sales                  int unsigned     default 0 comment '销量(冗余)',comment_count          int unsigned     default 0 comment '买家评论数量总和(冗余)',positive_comment_count int unsigned     default 0 comment '买家好评数量总和(冗余)',sort                   tinyint unsigned default 0 comment '自定义排序序号',gmt_create             datetime         default null comment '数据创建时间',gmt_modified           datetime         default null comment '数据最后修改时间',primary key (id)
) comment 'SKU(Stock Keeping Unit)' charset utf8mb4;-- SKU规格参数表(存储各SKU的属性与值,即规格参数):创建数据表
drop table if exists pms_sku_specification;
create table pms_sku_specification
(id              bigint unsigned auto_increment comment '记录id',sku_id          bigint unsigned  default null comment 'SKU id',attribute_id    bigint unsigned  default null comment '属性id',attribute_name  varchar(50)      default null comment '属性名称',attribute_value varchar(50)      default null comment '属性值',unit            varchar(10)      default null comment '自动补充的计量单位',sort            tinyint unsigned default 0 comment '自定义排序序号',gmt_create      datetime         default null comment '数据创建时间',gmt_modified    datetime         default null comment '数据最后修改时间',primary key (id)
) comment 'SKU数据' charset utf8mb4;-- -------------------------- --
-- 以下是插入测试数据及一些测试访问 --
-- -------------------------- ---- 品牌表:插入测试数据
insert into pms_brand (name, pinyin, description, keywords, enable)
values ('华为', 'huawei', '华为专注网络设备三十年', '华为,huawei,mate,magicbook', 1),('小米', 'xiaomi', '小米,为发烧而生', '小米,xiaomi,发烧', 1),('苹果', 'pingguo', '苹果,全球知名品牌', '苹果,apple,pingguo,iphone,mac', 1);-- 类别表:插入测试数据
insert into pms_category (name, parent_id, depth, is_parent, keywords, enable, is_display)
values ('手机 / 运营商 / 数码', 0, 1, 1, null, 1, 1),('手机通讯', 1, 2, 1, '手机,电话', 1, 1),('智能手机', 2, 3, 0, null, 1, 1),('非智能手机', 2, 3, 0, null, 1, 1),('电脑 / 办公', 0, 1, 1, null, 1, 1),('电脑整机', 5, 2, 1, '电脑,计算机,微机,服务器,工作站', 1, 1),('电脑配件', 5, 2, 1, '配件,组装,CPU,内存,硬盘', 1, 1),('笔记本', 6, 3, 0, '电脑,笔记本,微机,便携', 1, 1),('台式机 / 一体机', 6, 3, 0, '台式机,一体机', 1, 1);-- 品牌类别表:插入测试数据
insert into pms_brand_category (brand_id, category_id)
values (1, 3),(2, 3),(3, 3),(1, 8),(2, 8),(3, 8),(1, 9),(3, 9);-- 关联测试查询:各品牌有哪些类别的产品
select pms_brand_category.id, pms_brand.name, pms_category.name
from pms_brand_categoryleft join pms_brandon pms_brand_category.brand_id = pms_brand.idleft join pms_categoryon pms_brand_category.category_id = pms_category.id
order by pms_brand.pinyin;-- 属性表:插入测试数据
insert into pms_attribute (name, description, type, input_type, value_list, unit, is_allow_customize)
values ('屏幕尺寸', '智能手机屏幕尺寸', 0, 1, '6.1,6.3', '英寸', 1),('屏幕尺寸', '笔记本电脑屏幕尺寸', 0, 1, '14,15', '英寸', 1),('颜色', '智能手机颜色', 0, 1, '黑色,金色,白色', null, 1),('颜色', '衬衣颜色', 0, 1, '白色,蓝色,灰色,黑色', null, 1),('运行内存', '智能手机运行内存', 0, 1, '4,8,16', 'GB', 1),('CPU型号', '智能手机CPU型号', 0, 1, '骁龙870,骁龙880', null, 1),('机身毛重', '智能手机机身毛重', 0, 0, null, 'g', 0),('机身存储', '智能手机机身存储', 0, 1, '64,128,256,512', 'GB', 0),('操作系统', '智能手机操作系统', 0, 1, 'Android,iOS', null, 0),('操作系统', '电脑操作系统', 0, 1, '无,Windows 7,Windows 10,Ubuntu,Mac OS', null, 0);-- 属性模版表:插入测试数据
insert into pms_attribute_template (name, pinyin, keywords)
values ('智能手机', 'zhinengshouji', '手机'),('服装-上身', 'fuzhuang', '服装,上衣'),('服装-裤子', 'fuzhuang', '服装,裤'),('笔记本电脑', 'bijibendiannao', '电脑,笔记本'),('台式电脑', 'taishidiannao', '电脑,台式电脑,台式机');-- 相册表:插入测试数据
insert into pms_album (name, description)
values ('iPhone 13', null),('Mi 11 Ultra', null);-- 图片表:插入测试数据
insert into pms_picture (album_id, url, description, width, height)
values (1, '模拟数据:iPhone 13图片URL-1', null, 1024, 768),(1, '模拟数据:iPhone 13图片URL-2', null, 1024, 768),(1, '模拟数据:iPhone 13图片URL-3', null, 1024, 768),(1, '模拟数据:iPhone 13图片URL-4', null, 1024, 768),(1, '模拟数据:iPhone 13图片URL-5', null, 1024, 768),(2, '模拟数据:Mi 11 Ultra图片URL-1', null, 1024, 768),(2, '模拟数据:Mi 11 Ultra图片URL-2', null, 1024, 768),(2, '模拟数据:Mi 11 Ultra图片URL-3', null, 1024, 768),(2, '模拟数据:Mi 11 Ultra图片URL-4', null, 1024, 768),(2, '模拟数据:Mi 11 Ultra图片URL-5', null, 1024, 768);-- SPU表:插入测试数据
insert into pms_spu (id, name, type_number, title, description, list_price, stock, stock_threshold, unit, brand_id,brand_name, category_id, category_name, keywords, tags)
values (202112010000001, 'iPhone 13', 'A2404', '苹果手机iPhone 13(A2404)', '2021年新款,全网首发',5199.99, 5000, 20, '部', 3, '苹果', 3, '智能手机', 'ip13,iPhone13,苹果13', '20w快充,NFC,无线充电'),(202112010000002, '小米11 Ultra', 'M112021', '小米11 Ultra(M112021)', '2021年最新旗舰机',5899.99, 8000, 20, '部', 2, '小米', 3, '智能手机', 'mi11,xiaomi11,ultra', '67w快充,1亿像素,5000毫安电池');-- SPU详情表:插入测试数据
insert into pms_spu_detail (spu_id, detail)
values (1, '<div>iPhone 13的详情HTML</div>'),(2, '<div>小米11 Ultra的详情HTML</div>');-- SKU(Stock Keeping Unit)表:插入测试数据
insert into pms_sku (id, spu_id, title, attribute_template_id, specifications, price, stock, stock_threshold)
values (202112010000001, 2, '2021年新款,小米11 Ultra黑色512G,16G超大内存120Hz高刷67w快充', 1,'{"attributes":[{"id":1,"name":"屏幕尺寸","value":"6.1寸"},{"id":3,"name":"颜色","value":"黑色"},{"id":5,"name":"运行内存","value":"16GB"}]}',6999.99, 3000, 50),(202112010000002, 2, '2021年新款,小米11 Ultra白色512G,8G超大内存120Hz高刷67w快充', 1,'{"attributes":[{"id":1,"name":"屏幕尺寸","value":"6.1寸"},{"id":3,"name":"颜色","value":"白色"},{"id":5,"name":"运行内存","value":"8GB"}]}',6499.99, 3000, 50);-- SKU规格参数表(存储各SKU的属性与值,即规格参数):插入测试数据
insert into pms_sku_specification (sku_id, attribute_id, attribute_name, attribute_value, unit)
values (1, 1, '屏幕尺寸', '6.1', '寸'),(1, 3, '颜色', '黑色', null),(1, 5, '运行内存', '16', 'GB'),(2, 1, '屏幕尺寸', '6.1', '寸'),(2, 3, '颜色', '白色', null),(2, 5, '运行内存', '8', 'GB');

2.3具体开发顺序

目前涉及12张数据表,即12种数据类型,应该先开发基础的、与其它数据不直接相关的数据类型,例如相册、名牌、类别等,其它类型的开发将后置。

对于相册、名牌、类型这些数据,基本的数据操作至少包括:

  • 插入数据
  • 根据id删除数据
  • 根据id查询数据详情
  • 根据id修改数据
  • 查询数据列表
  • 其它……

2.4实现数据访问层的开发

数据访问层指的就是增删改查相关的数据操作,对于数据库中的数据操作,通常使用Mybatis框架来实现。

在实现Mybatis编程之前,首先,应该有各数据表对应的实体类,关于实体类的开发:

  • 实体类的名称应该与数据表名的关键字相对应,例如表名为pms_album,则实体类名为Album,表名为pms_attribute_template,则实体类名为AttributeTemplate

  • 实体类中的属性的类型应该与表设计保持一致,通常对应关系为:

    • 数据表字段类型 实体类属性类型
      bigint Long
      inttinyint Integer
      charvarchartext String
      date_time LocalDateTime
      decimal BigDecimal
  • 实体类中所有属性都应该是私有的

  • 实体类中所有属性都应该有对应的Setter & Getter方法【自动生成】

  • 实体类必须存在无参数构造方法

  • 实体类必须重写hashCode()equals(),且必须保证:hashCode()返回值相同时,equals()对比结果必须为truehashCode()返回值不同时,equals()对比结果必须为false【自动生成】

    • 提示:不同的开发工具、生成时使用的模板不同时,生成的代码可能不同,但不重要
  • 实体类都应该重写toString()方法,以输出所有字段的值,便于后续观察对象

  • 实体类都必须实现Serializable接口

    • 可以不定义序列化版本ID

建议将实体类放在项目根包下的entity包中(某些编程习惯中可能使用其它的包名,例如domain等)。

JSD-2204-酷鲨商城(管理商品模块)-Day02相关推荐

  1. JSD-2204-(业务逻辑开发)-秒杀业务-酷鲨商城前台业务总结-Day16

    1.开发酷鲨秒杀业务 1.1创建流控和降级的处理类 秒杀业务肯定是一个高并发的处理,并发数超过程序设计的限制时,就需要对请求的数量进行限流 Sentinel是阿里提供的SpringCloud组件,主要 ...

  2. 【微服务】Day17(酷鲨商城前台业务总结、布隆过滤器、Docker)

    酷鲨商城前台业务总结 "我负责的功能" 登录(SSO),注册 显示商品分类(自关联三级分类树) 显示商品列表 显示商品详情 购物车管理(显示购物车列表,添加购物车,删除购物车,修改 ...

  3. 【微服务】Day16(开发酷鲨商城秒杀业务)

    续RabbitMQ 接收RabbitMQ中的消息 quartz包下再创建一个新的类用于接收信息 RabbitMQConsumer代码如下 // 当前接收消息的类,也要保存到Spring容器中 @Com ...

  4. vue(三)酷鲨商城页面

    文章目录 login index detail login <!DOCTYPE html> <html> <head><meta charset=" ...

  5. 第五阶段:酷鲨商城项目——微服务

    <酷鲨商城>: 01.概述 (1)各阶段的项目进程 三阶段: ----><酷鲨商城引流平台> ---->SSM基本增删改查,完成的一个广告性质的展示页面四阶段: - ...

  6. [golang gin框架] 16.Gin 商城项目-商品模块数据表ER图关系分析

    1.数据表ER图 2.数据表相关 (1).商品分类表相关 1).数据表 -- ---------------------------- -- Table structure for goods_cat ...

  7. 酷鲨商城后台管理界面

    代码 <!DOCTYPE html> <html> <head><meta charset="UTF-8"><!-- impo ...

  8. JSD-2204-Elasticsearch-SpringData-酷鲨商城概述-Day07

    1.操作Elasticsearch 项目csmall-finish项目中 node文件夹下共享了ES文档,命令都在里面,可以测试 所有的代码都在"ES文档"中, 笔记略 下面我们要 ...

  9. 【青橙商城-管理后台开发】2. 商品服务模块搭建

    [青橙商城-管理后台开发]2. 商品服务模块搭建 1. 服务层模块-商品 pom.xml <dependencies><dependency><groupId>co ...

最新文章

  1. Java课程主观题作业_JAVA课程作业01
  2. CSS+jQuery/JavaScript图片切换播放
  3. 简单的Android对文件进行读写操作
  4. k8s安装部署步骤_30分钟无坑部署K8S单Master集群
  5. [Cake] 2. dotnet 全局工具 cake
  6. Web前端期末大作业--响应式性感美女模特博客网页设计(HTML+CSS+JavaScript)实现
  7. Python库:Python OS库
  8. 查看二进制文件,报错 You are not using binary logging
  9. 数据库基本SQL语句大全
  10. Linux-c对一个十六进制数的某一位取反
  11. 45. Use member function templates to accept all compatible types.
  12. SCI等英文文献免费下载方法总结
  13. IT战略规划怎样做得更务实
  14. 智能文档比对小程序,支持扫描件比对、PDF比对,Word比对,合同比对、公文比对,限时免费使用
  15. 遇到没有exe文件的驱动
  16. 【简单】字符串中最长元音字符串的长度
  17. Ubuntu系统下搭建svn服务器(及设置SVN提交必须输入注释)
  18. tomcat启动后无法访问到8080页面的原因
  19. 京东商品图片下载工具1.0 springboot版
  20. 前端Ts大写日期转化日期格式

热门文章

  1. 监控linux资源的软件,6个监控linux系统资源的快速工具
  2. Kindle 3---让声音来的更犀利些吧
  3. 简便的电脑通过kindle 3g上网
  4. python库turtle的一些实例
  5. XBOX360更新游戏封皮(FSD自制系统)
  6. php添加购物车模板,php购物车程序
  7. 端口号是访问服务器的标识
  8. 博弈论 之 2 什么是博弈论
  9. CryENGINE 3: reaching the speed of light
  10. Cadence快捷键使用