完善README
This commit is contained in:
92
README.md
Normal file
92
README.md
Normal file
@ -0,0 +1,92 @@
|
||||
# 详细配置指南
|
||||
|
||||
|
||||
|
||||
另见:[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 run serve`
|
||||
|
||||
运行成功如下:
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 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下项目后,直接运行
|
||||
|
||||
----
|
||||
|
||||
至此配置完成
|
Reference in New Issue
Block a user