FinanceSystem/环境配置.md

73 lines
3.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## Ruoyi-flowable-plus环境配置指南
> 版本 1.0 更新日期2024/06/11 作者:詹力
>
> 参考https://plus-doc.dromara.org/#/ruoyi-vue-plus/quickstart/init
Ruoyi-flowable-plus是一个支持工作流的若依后台管理框架。工作流的的支持可以有效解决流程审核和流程跟踪等问题。
## 一、后端配置
#### 1.1 软件与环境准备
下面的软件环境在裸机环境下实测可以运行。
> 网盘地址http://logzhan.ticp.io:52440 账号uestc 密码123
>
> 1. IDE : [IntelliJ IDEA 2022.1.3 (Ultimate Edition)](http://logzhan.ticp.io:52440/web%E5%BC%80%E5%8F%91/IDEA-2022.1.3)
> 2. NodeJs : [NodeJS 14.14](http://logzhan.ticp.io:52440/d/%E6%88%91%E7%9A%84%E5%A4%87%E4%BB%BD/logzhan%E7%9A%84%E4%BA%91%E7%9B%98/web%E5%BC%80%E5%8F%91/node-v14.14.0-x64.msi)
> 3. Redis : [下载地址](http://logzhan.ticp.io:52440/d/%E6%88%91%E7%9A%84%E5%A4%87%E4%BB%BD/logzhan%E7%9A%84%E4%BA%91%E7%9B%98/GoWeb%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85/Redis-Windows.zip)
> 4. SDK : [graalvm-17](http://logzhan.ticp.io:52440/d/%E6%88%91%E7%9A%84%E5%A4%87%E4%BB%BD/logzhan%E7%9A%84%E4%BA%91%E7%9B%98/Web%E5%BC%80%E5%8F%91/graalvm-community-jdk-17.0.8_windows-x64_bin.zip)
> 5. SQL : [Sql 8.0]()
#### 1.2 IDE的相关配置和依赖下载
启动`Intellij IDEA`选择打开`Ruoyi-flowable-plus`的工程目录IDE即可**自动下载依赖**(IDE内置Maven)。根据[官方教程](https://plus-doc.dromara.org/#/ruoyi-vue-plus/quickstart/init)配置SDK如下。在`SDK`选项中选择`Edit`并选择1.1中graalvm-17的解压目录即可管理。
![](https://foruda.gitee.com/images/1678941027820943505/c688e01e_1766278.png)
同步成功后如下图所示:
![](http://logzhan.ticp.io:30000/logzhan/PictureHost/raw/branch/main/Ruoyi-flowable-Plus/%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/Image/IDE%E4%BE%9D%E8%B5%96%E5%90%8C%E6%AD%A5.png)
#### 1.3 本地数据库的配置和导入
打开`nvicat`或者其他数据库软件,创建`ry-flowable-plus`或者其他你喜欢的数据库名。
<img src="http://logzhan.ticp.io:30000/logzhan/PictureHost/raw/branch/main/Ruoyi-flowable-Plus/%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/Image/10%E3%80%81%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93.png" style="zoom:50%;" />
选择你创建的数据库并打开,右键选择运行数据库。
![](http://logzhan.ticp.io:30000/logzhan/PictureHost/raw/branch/main/Ruoyi-flowable-Plus/%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/Image/10%E3%80%81%E8%BF%90%E8%A1%8C%E6%95%B0%E6%8D%AE%E5%BA%93.png)
1. 运行`mysql_ry_v0.8.x.sql`
2. 运行`flowable_6.7.2_mysql(...).sql`
3. 运行`mysql_xxl_job.sql`
#### 1.4 远程数据库的配置
数据库的配置,打开`ruoyi-admin\src\main\resource\application-dev.yml`,下面的`url`是采用个人搭建的公共数据库,可以在外网访问。本地数据库修改为`mysql://localhost:3306/`。`ry-flowable-plus`是数据库名,根据个人实际创建数据库时的名字进行调整。
```yml
# 主库数据源
master:
type: ${spring.datasource.type}
driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应 考虑性能问题)
url: jdbc:mysql://logzhan.ticp.io:53306/ry-flowable-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
username: root
password: 351002
```
## 二、前端配置
前端配置非常简单,只要求安装`nodejs`,然后进入`ruoyi-ui`
```shell
npm install --registry=https://registry.npmmirror.com
npm run dev
```
成功后会弹出网址即可访问。