163 lines
6.6 KiB
Markdown
163 lines
6.6 KiB
Markdown
# 详细配置指南
|
||
|
||
### ✔️如何下载本工程:
|
||
|
||
#### 方法1
|
||
|
||
进入[gitea.monjack.cn/monjack/20250612](https://gitea.monjack.cn/monjack/20250612)
|
||
|
||
点击代码按钮,选择下载ZIP,并解压到对应文件夹
|
||
|
||

|
||
|
||
#### 方法2(推荐)
|
||
|
||
如系统存在git环境,直接运行
|
||
|
||
`git clone https://gitea.monjack.cn/monjack/20250612.git`
|
||
|
||
|
||
|
||
**使用本工程前请务必配置好相应开发环境,本指南不包含不限于JDK、Springboot等及其开发工具的配置与安装**
|
||
|
||
另见:[README_opreate](README_operate.md) 网页链接:[125.64.9.222:8022](http://125.64.9.222:8022/stuff/exam_operate/exam_operate_1.html)
|
||
|
||
### 1️⃣vue工程:
|
||
|
||
❗在 .env.development 文件中配置好相应变量:
|
||
|
||

|
||
|
||
终端定位到工程根目录下(一般是:`C:\exam_app\app_vue` )
|
||
|
||
`cd C:\exam_app\app_vue`
|
||
|
||
运行命令 `npm install`安装必要库
|
||
|
||
运行命令`npm run serve`
|
||
|
||
运行成功如下:
|
||
|
||
```shell
|
||
(base) PS C:\Users\yourUserName> cd C:\exam_app\app_vue
|
||
(base) PS C:\exam_app\app_vue> npm install
|
||
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
|
||
npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
|
||
npm warn deprecated @humanwhocodes/config-array@0.5.0: Use @eslint/config-array instead
|
||
npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
|
||
npm warn deprecated consolidate@0.15.1: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
|
||
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
|
||
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
|
||
npm warn deprecated @humanwhocodes/object-schema@1.2.1: Use @eslint/object-schema instead
|
||
npm warn deprecated webpack-chain@6.5.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
|
||
npm warn deprecated eslint@7.32.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.
|
||
|
||
added 925 packages, and audited 926 packages in 9s
|
||
|
||
119 packages are looking for funding
|
||
run `npm fund` for details
|
||
|
||
12 vulnerabilities (8 moderate, 4 high)
|
||
|
||
To address issues that do not require attention, run:
|
||
npm audit fix
|
||
|
||
To address all issues (including breaking changes), run:
|
||
npm audit fix --force
|
||
|
||
Run `npm audit` for details.
|
||
(base) PS C:\exam_app\app_vue> npm run serve
|
||
|
||
> app_vue@0.1.0 serve
|
||
> vue-cli-service serve
|
||
|
||
INFO Starting development server...
|
||
|
||
|
||
DONE Compiled successfully in 3161ms 21:55:22
|
||
|
||
|
||
App running at:
|
||
- Local: http://localhost:58627/
|
||
- Network: http://172.18.0.1:58627/
|
||
|
||
Note that the development build is not optimized.
|
||
To create a production build, run npm run build.
|
||
```
|
||
|
||
|
||
|
||
|
||
|
||
### 2️⃣数据库配置:
|
||
|
||
❗仅适用于本工程,不同题目应配置不同的Table,请注意识别
|
||
|
||
安装 wampserver 或其他 MAMP本地开发环境软件 ,本地数据库亦可
|
||
|
||
执行下列sql语句(仅适用本项目)
|
||
|
||
*exam_xxxxxx_xxxxx* 替换为 *VPS database name*
|
||
|
||
```sql
|
||
create database exam_xxxxxx_xxxxx;
|
||
use exam_xxxxxx_xxxxx;
|
||
create table user_70(name char(50),address char(50),password char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||
insert into user_70(name,address,password)values('mike','shanghai','c4ca4238a0b923820dcc509a6f75849b');
|
||
insert into user_70(name,address,password)values('rose','beijing','c4ca4238a0b923820dcc509a6f75849b');
|
||
create table person_805(id varchar(50),sfz_id varchar(20),name varchar(20),gender varchar(1),password varchar(20), hometown varchar(20),chronic_disease varchar(100),birthday int,emr text,create_time int,update_time int)ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||
create index `sfz_id` on `person_805` (sfz_id);
|
||
insert into person_805(id,sfz_id,name,gender,password,hometown,chronic_disease,birthday,emr,create_time,update_time)values ('001','510103198208210452','罗维','1','123','510101','hypertension','398748962','三年前确诊,病情控制良好','1636424977','1636424977');
|
||
create table person_health_805(id varchar(50),sfz_id varchar(20),weight int,height int,heart_rate int,sbp int ,dbp int,blood_sugar DECIMAL(5,1),create_time int,update_time int)ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||
create index `sfz_id` on `person_health_805` (sfz_id);
|
||
insert into person_health_805(id,sfz_id,height,weight,heart_rate,sbp,dbp,blood_sugar,create_time,update_time)values('001','510103198208210452','176','71','78','120','75','4.1','1636424977','1636424977');
|
||
insert into person_health_805(id,sfz_id,height,weight,heart_rate,sbp,dbp,blood_sugar,create_time,update_time)values('002','510103198208210452','176','72','73','126','80','6.8','1636511377','1636511377');
|
||
|
||
create table person_base_info_881_1(id varchar(18),name varchar(20),sbp int,dbp int)ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||
insert into person_base_info_881_1(id,name,sbp,dbp)values('510103234','罗维','114','70');
|
||
insert into person_base_info_881_1(id,name,sbp,dbp)values('510103239','洪七公','134','89');
|
||
|
||
|
||
```
|
||
|
||
|
||
|
||
### 3️⃣Springboot配置
|
||
|
||
|
||
|
||
配置 **application.yml**
|
||
|
||
```yml
|
||
server:
|
||
port: <你的springboot端口(VPS spring boot port)> # 替换<>内容
|
||
|
||
spring:
|
||
datasource:
|
||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||
username: root
|
||
password: #默认密码为空
|
||
url: jdbc:mysql://localhost:3306/<VPS database name>?characterEncoding=utf-8&serverTimezone=UTC&useSSL=false # 替换<>内容
|
||
|
||
mybatis:
|
||
mapper-locations: classpath:mapper/*Mapper.xml
|
||
type-aliases-package: com.luowei.exam
|
||
configuration:
|
||
#log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||
|
||
```
|
||
|
||
|
||
|
||
配置完成后
|
||
|
||
使用 IDEA 打开app_sb下项目后,直接运行
|
||
|
||

|
||
|
||
点击 public class AppSbApplication 或 public static void main...左侧绿色三角
|
||
|
||
----
|
||
|
||
至此配置完成 |