Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
6b604407
Commit
6b604407
authored
Mar 30, 2018
by
Junling Bu
Browse files
更新文档。
parent
535f54a8
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/1.md
View file @
6b604407
...
@@ -381,6 +381,15 @@ sudo apt-get install mysql-client
...
@@ -381,6 +381,15 @@ sudo apt-get install mysql-client
3.
用户自行学习文档,完成
`创建数据库`
、
`创建用户`
和
`分配权限`
三个操作;
3.
用户自行学习文档,完成
`创建数据库`
、
`创建用户`
和
`分配权限`
三个操作;
4.
利用Workbench的
`Server`
菜单下的
`Data Import`
完成数据导入。
4.
利用Workbench的
`Server`
菜单下的
`Data Import`
完成数据导入。
*
命令脚本
```
bash
cd
deploy
mysql
-h
localhost
-u
root
-p123456
source
./litemall-db/litemall_schema.sql
source
./litemall-db/litemall.sql
```
其中123456是用户所设置的MySQL的管理员密码。
#### 1.5.3.5 Tomcat
#### 1.5.3.5 Tomcat
1.
本项目中采用二进制jar包方式来部署Spring Boot后端应用,因此可以不需要部署在tomcat中。
1.
本项目中采用二进制jar包方式来部署Spring Boot后端应用,因此可以不需要部署在tomcat中。
...
@@ -458,15 +467,28 @@ https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#dep
...
@@ -458,15 +467,28 @@ https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#dep
3.
使用PuTTY登录云主机
3.
使用PuTTY登录云主机
4.
运行脚本部署运行
4.
如果用户没有部署litemall数据库,可以运行以下命令:
```bash
cd deploy
mysql -h localhost -u root -p123456
source ./litemall-db/litemall_schema.sql
source ./litemall-db/litemall.sql
```
注意,123456是用户所设置的MySQL管理员密码
警告:
> litemall_schema.sql会尝试删除litemall数据库然后重建一个新的数据。
5.
运行脚本部署运行
```bash
```bash
sudo ./deploy/bin/deploy.sh
sudo ./deploy/bin/deploy.sh
```
```


5.
测试部署是否成功
6.
测试部署是否成功
请确保云主机的安全组已经允许相应的端口(见1.5.3.1);
请确保云主机的安全组已经允许相应的端口(见1.5.3.1);
然后测试是否部署成功(xxx.xxx.xxx.xxx是云主机IP):
然后测试是否部署成功(xxx.xxx.xxx.xxx是云主机IP):
...
@@ -477,6 +499,11 @@ https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#dep
...
@@ -477,6 +499,11 @@ https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#dep
http://xxx.xxx.xxx.xxx:8080/#/login
http://xxx.xxx.xxx.xxx:8080/#/login
```
```
6
.
自动上传脚本
7
.
自动上传脚本
为了简化步骤1和步骤2,完成了util/upload.sh脚本,用户需要设置相应的云主机IP和密钥文件路径
为了简化步骤1和步骤2,完成了util/upload.sh脚本,用户需要设置相应的云主机IP和密钥文件路径。
\ No newline at end of file
该脚本会自动把当前项目不同模块下的最终部署文件复制到deploy文件夹中,然后上传到云主机。
注意:
> 上传脚本没有自动做Spring Boot项目打包和Vue项目打包工作
> 因此运行该脚本前请确认最终部署文件已经生成。
> 如果用户觉得需要,可以自行在upload.sh脚本中添加相应的编译打包命令。
\ No newline at end of file
doc/2.md
View file @
6b604407
...
@@ -186,6 +186,17 @@ litemall数据库基于nideshop中的[nideshop.sql](https://github.com/tumobi/ni
...
@@ -186,6 +186,17 @@ litemall数据库基于nideshop中的[nideshop.sql](https://github.com/tumobi/ni
## 2.2 litemall-db
## 2.2 litemall-db
技术:
*
Spring Boot 1.5.10
*
MySQL
*
Druid
*
Mybatis
*
PageHelper
*
Mybatis Generator
*
Mybatis Generator非官方插件mybatis-generator-plugin
因为litemall-db是一个业务模块,并不对外直接服务,因此无需使用Spring MVC。


这里litemall-db模块可以分成以下几种代码:
这里litemall-db模块可以分成以下几种代码:
...
@@ -224,6 +235,9 @@ litemall数据库基于nideshop中的[nideshop.sql](https://github.com/tumobi/ni
...
@@ -224,6 +235,9 @@ litemall数据库基于nideshop中的[nideshop.sql](https://github.com/tumobi/ni
对象存储服务目前的目标是支持图片的上传下载。
对象存储服务目前的目标是支持图片的上传下载。
作为后台模块之一,litemall-os-api并没有对应的前端模块,而只是在litemall-admin模块
的对象存储页面中允许管理员修改。
### 2.3.1 业务
### 2.3.1 业务
支持服务:
支持服务:
...
...
doc/3.md
View file @
6b604407
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
*
进一步区分商品和货品的关系
*
进一步区分商品和货品的关系
*
地址优化,目前每一次点击都会请求后台,应该缓存已有的数据
*
地址优化,目前每一次点击都会请求后台,应该缓存已有的数据
*
商品数量和规格中,如果货品数量不足,则显示不能点击的效果
*
商品数量和规格中,如果货品数量不足,则显示不能点击的效果
*
登录逻辑重新设计,如果用户没有登录,则相关页面显示登录的效果
*
商品好评计算与显示
## 3.1 litemall-wx-api
## 3.1 litemall-wx-api
...
@@ -27,6 +27,31 @@
...
@@ -27,6 +27,31 @@
### 3.1.2 安全
### 3.1.2 安全
#### 3.1.2.1 Token
用户登录成功以后,后端会返回
`token`
,之后用户的请求都会携带token。
目前token的失效和跟新机制没有涉及。
#### 3.1.2.2 CROS
如果litemall-admin-api不配置CROS,则Spring Boot会失败。
但是,这里litemall-wx-api没有配置CROS,Spring Boot却不会报错,需要进一步研究。
#### 3.1.2.3 账号密码加盐
如果是微信登录,那么无需账号和密码。
而如果用户采用了账号和密码的形式登录,那么后端需要把用户密码加盐。
#### 3.1.2.4 限制登录
如果采用账号密码登录,那么登录失败一定次数,应该限制登录。
进一步地,如果项目启用了短信功能,应该短信提醒用户,防止他人登录。
目前这里没有实现,仅列出。
### 3.1.3 支付
### 3.1.3 支付
准备采用weixin-java-tools工具简化微信支付代码的开发。
准备采用weixin-java-tools工具简化微信支付代码的开发。
...
...
doc/4.md
View file @
6b604407
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
*
查询时排序功能
*
查询时排序功能
*
业务功能重新设计,例如即使是管理员也不能删除修改用户的相关数据
*
业务功能重新设计,例如即使是管理员也不能删除修改用户的相关数据
*
用户密码加密存储
*
用户密码加密存储
*
富文本编辑器
*
vue和vue-element-admin等及时更新
## 4.1 litemall-admin-api
## 4.1 litemall-admin-api
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment