一、环境整合
构建工具(参考工具部署方式)
软件名称 | 版本 | 相关文章推荐 |
---|---|---|
Git | 13.5.0 | https://www.cnblogs.com/liuyangfirst/p/15996063.html |
NodeJS | 16.0.0 | https://www.cnblogs.com/liuyangfirst/p/15998172.html |
JDK | 1.8 | https://www.cnblogs.com/liuyangfirst/p/14334385.html |
Maven | 3.6.0 | https://www.cnblogs.com/liuyangfirst/p/15981202.html |
MySQL | 5.6.10 | https://www.cnblogs.com/liuyangfirst/p/15997667.html |
Redis | 5.0.10 | https://www.cnblogs.com/liuyangfirst/p/15998117.html |
DBeaver | 7.3.0 | https://www.cnblogs.com/liuyangfirst/p/15997753.html |
IntelliJ IDEA | 尽量使用比较新的版本 | https://www.jetbrains.com/idea/ |
RedisDesktopManager | 0.9.3.817 | https://www.cnblogs.com/liuyangfirst/p/15998132.html |
Logstash | 0.0.0 | https://www.cnblogs.com/liuyangfirst/p/16008094.html |
RabbitMQ | 0.0.0 | https://www.cnblogs.com/liuyangfirst/p/16002565.html |
Elasticsearch | 0.0.0 | https://www.cnblogs.com/liuyangfirst/p/16004977.html |
二、前端lilishop-ui部署
1.下载源码到本地
-
保证git安装成功,使用命令下载项目到本地。
PC前端(开发人员管理端+商家端+买家用户端)
git clone git@gitee.com:beijing_hongye_huicheng/lilishop-ui.git
-
前端项目结构介绍.

.vscode --- VScode工具的配置文件 (.idea)
node_modules --- Vue项目的运行依赖文件)(相当于jar包,npm install 加载后产生的)
public --- 资源文件夹(浏览器图标)(资源文件夹)
src --- 源码文件夹 (编码文件夹,核心文件夹)
.gitignoregit --- 忽略文件 (git忽略文件)
index.htm1 --- 入口HTML文件 (入口文件,起始页)
package.json --- 信息描述文件 (相当于pom文件)
README.md --- 注释文件 (说明文件)
vite.config.js --- Vue配置文件 (相当于yaml文件)
2.安装nodejs
- 这里主要是要注意版本,如果版本不对会产生很多问题,如果版本没有问题就会很容易成功。(存在大量兼容性问题)
序号 | 名称 | 版本 |
---|---|---|
1 | node.js | v14.18.3 |
- 这是使用的nvm安装的


- 具体安装请查看nvm安装的相关文档。
3.安装yarn
# 安装yarn(如果你机器安装过,可以忽略这一步)
npm install -g yarn
4.打包启动
4.1 下载相关的包
-
进入模块目录
cd D:\workspace_html\2024\lilishop-ui # 三个模块都是这样进入 cd manager

-
下载安装包命令.(不报错就是下载成功)
yarn install

4.2 打包
-
使用打包命令(没有报错就是成功了)
yarn build


4.3 启动命令
-
输入启动命令(不报错就是启动成功了)
yarn run dev

- 最后出现如图的界面就是启动成功,会有一个地址,进行访问.


- 访问地址: http://localhost:10003/

- 输入账户/密码 : admin/123456,进入登录界面

- 官方同款体验地址,账户密码如上.
序号 | 名称 | 版本 |
---|---|---|
1 | 平台方(运营平台) | https://admin-b2b2c.pickmall.cn |
4.4 其他模块
- buyer和seller模块是和manager模块的部署方式一样.
4.4.1 buyer模块
- 启动buyer模块.



- 注册账户.

- 官网体验
序号 | 名称 | 版本 |
---|---|---|
1 | 商城方 | https://pc-b2b2c.pickmall.cn |
4.4.2 seller模块
- 部署seller




- 本地访问地址:http://localhost:10002/

- 点击登录进入主界面.

- 官网体验
序号 | 名称 | 版本 |
---|---|---|
1 | 店铺方(第三方) | https://store-b2b2c.pickmall.cn |
- 账户/密码 : 13011111111/111111
三、后台安装
1.数据库部署
- 保证数据库安装没问题(此版本要使用MySQL8),找到项目的DB目录,打开README文件.

-
使用git命令下载sql脚本到本地.
https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql
-
下载后如图所示,右键脚本run.


- 同样的xxl-job 的数据库也要这样加入到数据库.

2. 修改配置文件
- 以buyer为例,其他模块类似.
序号 | 名称 | 地址 |
---|---|---|
1 | application.yml | buyer-api\src\main\resources\application.yml |

- 修改内容
序号 | 名称 | 描述 |
---|---|---|
1 | 数据库 | 修改为本地数据库的账户和密码: username/password |
2 | redis | 修改为本地redis的账户和密码,这边没有密码就删除了 |
3 | Logstash | 修改为本地IP地址 |



- 修改xxl-job的数据库账户密码
序号 | 名称 | 描述 |
---|---|---|
1 | 数据库 | 修改为本地数据库的账户和密码: username/password |

3. Maven加在包
- 点击如图的位置,进行加在包和打包.(Maven配置没问题就不会出错)

4.项目启动
- 中间件要按顺序启动,不然会报错
序号 | 名称 | 描述 |
---|---|---|
1 | Logstash | 必须第一个启动,不然会报错 |
2 | Elasticsearch | 两个启动 |
3 | RabbitMQ | 直接启动 |
4 | Redis | 直接启动 |
5 | xxl-job | 启动 (xxl-job\xxl-job-admin-2.3.0-SNAPSHOT.jar) |
6 | BuyerApiApplication | buyer-api\src\main\java\cn\lili\BuyerApiApplication.java |
-
xxl-job启动命令
java -jar xxl-job-admin-2.3.0-SNAPSHOT.jar
-
启动BuyerApiApplication


- 访问地址,需要配置打开knife4J.
序号 | 名称 | 描述 |
---|---|---|
1 | 开启swagger的方式 | https://www.cnblogs.com/liuyangfirst/p/16050051.html |
- 访问swagger就能看到所有的接口了

四、遇到问题
1. Logstash一直报错
-
一直报如下错误.
WARNING, using JAVA_HOME while Logstash distribution comes with a bundled JDK
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Sending Logstash logs to C:/Program Files/Elastic/logstash-7.11.1/logs which is now configured via log4j2.properties
[2021-02-25T14:57:05,899][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.11.1", "jruby.version"=>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) 64-Bit Server VM 11.0.10+8-LTS-162 on 11.0.10+8-LTS-162 +indy +jit [mswin32-x86_64]"}
[2021-02-25T14:57:06,132][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2021-02-25T14:57:06,858][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"C:/Program Files/Elastic/logstash-7.11.1/sql.conf"}
[2021-02-25T14:57:07,136][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2021-02-25T14:57:07,747][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2021-02-25T14:57:12,678][INFO ][logstash.runner ] Logstash shut down.
[2021-02-25T14:57:12,968][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.13.0.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.13.0.jar:?]
at C_3a_.Program_20_Files.Elastic.logstash_minus_7_dot_11_dot_1.lib.bootstrap.environment.<main>(C:\Program Files\Elastic\logstash-7.11.1\lib\bootstrap\environment.rb:89) ~[?:?] -
查到的各种修改方案都没有效果,最后卸载了安装了旧版本,就不报这个错误了.
序号 | 名称 | 描述 |
---|---|---|
1 | Logstash 8.15.3 | 刚开始安装这个新版本一直报错,换机器也是这个错误 |
2 | logstash-7.17.24 | 改为这个版本,同时要是其他中间件先启动,就是第一启动Logstash,不然还是报上述错误 |
-
项目启动后,一直提示链接Logstash警告,不知道这个ip怎么修改.
2024-09-21 04:20:30.373 WARN 2872 --- [gistrationTask1] d.c.b.a.c.r.ApplicationRegistrator : Failed to register application as Application(name=buyer-api, managementUrl=http://LAPTOP-RF86FEB6:8888/actuator, healthUrl=http://LAPTOP-RF86FEB6:8888/actuator/health, serviceUrl=http://LAPTOP-RF86FEB6:8888/) at spring-boot-admin ([http://127.0.0.1:8000/instances]): I/O error on POST request for "http://127.0.0.1:8000/instances": Connect to 127.0.0.1:8000 [/127.0.0.1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to 127.0.0.1:8000 [/127.0.0.1] failed: Connection refused: connect. Further attempts are logged on DEBUG level
WARN in net.logstash.logback.appender.LogstashTcpSocketAppender[LOGSTASH] - Log destination 127.0.0.1:9600: Waiting 29989ms before attempting reconnection.
结语
呕心沥血,连续爆肝9个小时(需要写配置环境的文档,还要反复测试,以便为各位看官老爷提供最好的精品文章),希望点赞,收藏,评论,转发,您的支持就是本博主前进的动力.