|
|
|
@ -1,411 +0,0 @@
|
|
|
|
|
# 工具版本
|
|
|
|
|
|
|
|
|
|
参考
|
|
|
|
|
|
|
|
|
|
- [Mysql] 5.7
|
|
|
|
|
|
|
|
|
|
- [Jdk] 1.8
|
|
|
|
|
|
|
|
|
|
- [Spring Boot] 2.3.5
|
|
|
|
|
|
|
|
|
|
- [Mybatis-plus] 3.3.2
|
|
|
|
|
|
|
|
|
|
- [flyway] 5.2.1
|
|
|
|
|
|
|
|
|
|
- [Apache Maven] 3.5
|
|
|
|
|
|
|
|
|
|
- [Node.js] 14.16.0
|
|
|
|
|
|
|
|
|
|
- [Windows 10]
|
|
|
|
|
|
|
|
|
|
实际
|
|
|
|
|
|
|
|
|
|
Mysql 5.7.34
|
|
|
|
|
|
|
|
|
|
JDK 1.8u291
|
|
|
|
|
|
|
|
|
|
IdeaJ 2020.2.1
|
|
|
|
|
|
|
|
|
|
Spring Boot DTD
|
|
|
|
|
|
|
|
|
|
Maven 3.5.4
|
|
|
|
|
|
|
|
|
|
Windows7
|
|
|
|
|
|
|
|
|
|
Git 2.33.0 x64
|
|
|
|
|
|
|
|
|
|
Node 13.14.0-x64
|
|
|
|
|
|
|
|
|
|
Vscode 1.59.0
|
|
|
|
|
|
|
|
|
|
# 环境准备
|
|
|
|
|
|
|
|
|
|
前端:
|
|
|
|
|
|
|
|
|
|
后端:
|
|
|
|
|
|
|
|
|
|
## 后端
|
|
|
|
|
|
|
|
|
|
### Mysql
|
|
|
|
|
|
|
|
|
|
下载msi文件
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### JDK
|
|
|
|
|
|
|
|
|
|
一直下一步,直至完成。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
配置环境变量
|
|
|
|
|
|
|
|
|
|
JAVA_HOME C:\\Program Files\\Java\\jdk1.8.0_291
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### IdeaJ
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
以上选项,都可以不选,不影响。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
首次登陆
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### Maven
|
|
|
|
|
|
|
|
|
|
下载地址
|
|
|
|
|
|
|
|
|
|
https://dlcdn.apache.org/maven/maven-3/3.5.4/binaries/
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
将压缩包解压到
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
添加环境变量M2_HOME C:\\Program Files\\apache-maven-3.5.4
|
|
|
|
|
|
|
|
|
|
(旧版变量写法:MAVEN_HOME)
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
Path环境变量,增加 ;%M2_HOME%C:\\bin
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### 插件
|
|
|
|
|
|
|
|
|
|
IdeaJ安装spring boot开发插件
|
|
|
|
|
|
|
|
|
|
已自带,不用再安装。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
安装lombok
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## 公共
|
|
|
|
|
|
|
|
|
|
### Git
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
如下界面表示安装成功
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
为idea指定git路径
|
|
|
|
|
|
|
|
|
|
默认情况下,IDEA是不自带git运行程序的,所以需要通过
|
|
|
|
|
菜单-\>settings-\>Version Control-\>Git-\>Path to Git executable:
|
|
|
|
|
设置为安装git中所安装的git.exe
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
获取gitee上面的要拉取的项目url
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
file -\> new -\> Project from Version Control -\> Git
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
点击【Clone】,开始拉代码。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## 前端
|
|
|
|
|
|
|
|
|
|
### Node
|
|
|
|
|
|
|
|
|
|
下一步
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### Vscode
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
# 开发环境
|
|
|
|
|
|
|
|
|
|
## 前端
|
|
|
|
|
|
|
|
|
|
### 下载源码
|
|
|
|
|
|
|
|
|
|
新建文件夹C:\\vsproj用于存放前端项目源码
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
下载源码,在vscode使用【ctrl】+【\`】或者【Terminal】-\>【New
|
|
|
|
|
Terminal】。用cd命令进入相应的文件夹。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
执行git clone https://gitee.com/anji-plus/report.git,拉代码。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### 设置环境
|
|
|
|
|
|
|
|
|
|
调整连接后端的IP,改为后端API代码所在的IP、所使用的端口。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### 编译运行
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
前端所在文件夹:vsproj\\report
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
\>git checkout dev
|
|
|
|
|
|
|
|
|
|
\>git checkout -b xxx
|
|
|
|
|
|
|
|
|
|
\>git branch -D xxx
|
|
|
|
|
|
|
|
|
|
进入前端代码文件夹,执行如下命令:
|
|
|
|
|
|
|
|
|
|
命令一:cd ….\\report\\report-ui
|
|
|
|
|
|
|
|
|
|
命令二:npm init -y //会调整package.json
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
命令三:npm install
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
命令四:npm run dev
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## 后端
|
|
|
|
|
|
|
|
|
|
新建文件夹用于存放后端代码C:\\ijproj,将git下载的代码解压至该目录。
|
|
|
|
|
|
|
|
|
|
### 下载源码
|
|
|
|
|
|
|
|
|
|
具体步骤见2.2.1Git
|
|
|
|
|
|
|
|
|
|
### 依赖插件
|
|
|
|
|
|
|
|
|
|
下载依赖和插件。Git完代码后,会自动下载依赖和插件。如果pom中的依赖和插件爆红。可设置maven,File
|
|
|
|
|
——\> Settings。以下设置均采用的是IdeaJ所带maven插件。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
如上图配置后,重新下载依赖和插件
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
遇到个别顽固爆红的依赖和插件,可以直接在本地资料库.m2\\repository中查找,确认是否已经下载。确认已经下载的话,则可以尝试在该依赖或者插件中增加版本号(与资料库中的一致,org.springframework.boot对应的路径
|
|
|
|
|
资料库路径\\org\\springframework\\boot,spring-boot-maven-plugin对应上述路径的子文件夹spring-boot-maven-plugin,此文件夹即spring-boot-maven-plugin的子文件夹是版本号2.3.5.RELEASE,打开2.3.5.RELEASE就是对应的jar包等内容)。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### 设置Mysql
|
|
|
|
|
|
|
|
|
|
设置好mysql,以便运行时,自动进行初始化。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
调整为mysql的现有配置
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
\-dev,-prod也调整数据库
|
|
|
|
|
|
|
|
|
|
### 运行后端
|
|
|
|
|
|
|
|
|
|
确认启动了Mysql服务
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
说明后端服务已经启动,如下图所示
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## 启动
|
|
|
|
|
|
|
|
|
|
数据库、后端、前端
|
|
|
|
|
|
|
|
|
|
1确保mysql已经启动
|
|
|
|
|
|
|
|
|
|
2运行后端代码
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
3运行前端代码
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
用户:admin
|
|
|
|
|
|
|
|
|
|
密码:123456
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
# 错误
|
|
|
|
|
|
|
|
|
|
## 问题一
|
|
|
|
|
|
|
|
|
|
遇到Error creating bean with name 'flywayInitializer' defined in class path
|
|
|
|
|
resource解决办法
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
将这个Resolved
|
|
|
|
|
locally后面的**版本号复制**下来,连着符号一起复制,然后找到你数据库中的**flyway_schema
|
|
|
|
|
\_history**这个表,在最下面那一行数据中把刚刚复制的版本号替换进去就可以了。
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## 问题二
|
|
|
|
|
|
|
|
|
|
问题现象:报表设计界面中看不到图表,
|
|
|
|
|
|
|
|
|
|
查看日志,Access denied for user 'ajreport'@'localhost' (using password: YES)
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
默认用户ajreport,密码ajreport
|
|
|
|
|
|
|
|
|
|
改为初始化时的,用户root,密码root
|
|
|
|
|
|
|
|
|
|

|