添加文档

This commit is contained in:
648540858
2023-05-29 09:40:36 +08:00
parent 5639719879
commit a91fe69f76
3 changed files with 60 additions and 4 deletions

View File

@@ -29,10 +29,57 @@ java -jar wvp-pro-*.jar
```
这也是我自己最常用的方式。
## 2 配置WVP-PRO
### 2.1 Mysql数据库配置
首先你需要创建一个名为wvp也可使用其他名字的数据库并使用sql/mysql.sql导入数据库初始化数据库结构。
(这里注意取决于版本新版的sql文件夹下有update.sql补丁包一定要注意运行导入)
在application-dev.yml中配置使用1.2方式的是在jar包的同级目录的application.yml配置数据库连接包括数据库连接信息密码
wvp支持多种数据库包括MysqlPostgresql金仓等配置任选一种即可。
### 2.1 数据库配置
#### 2.1.1 初始化数据库
首先使用创建数据库然后使用sql/初始化.sql初始化数据库如果是从旧版升级上来的使用升级sql更新。
#### 2.1.2 Mysql数据库配置
数据库名称以wvp为例
```yaml
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
username: root
password: 12345678
mybatis:
configuration:
map-underscore-to-camel-case: true
```
#### 2.1.3 Postgresql数据库配置
数据库名称以wvp为例
```yaml
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true
username: root
password: 12345678
mybatis:
configuration:
map-underscore-to-camel-case: true
pagehelper:
helper-dialect: postgresql
```
#### 2.1.4 金仓数据库配置
数据库名称以wvp为例
```yaml
spring:
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.kingbase8.Driver
url: jdbc:kingbase8://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=utf8
username: root
password: 12345678
mybatis:
configuration:
map-underscore-to-camel-case: true
pagehelper:
helper-dialect: postgresql
```
### 2.2 Redis数据库配置
配置wvp中的redis连接信息建议wvp自己单独使用一个db。
### 2.3 配置服务启动端口(可直接使用默认配置)