Skip to content

Commit

Permalink
Merge pull request #43 from hbq969/dev
Browse files Browse the repository at this point in the history
feature(将配置中心分离为独立安装部署的模块)
  • Loading branch information
hbq969 authored Feb 23, 2023
2 parents 0759351 + de2ed69 commit 554f611
Show file tree
Hide file tree
Showing 27 changed files with 78 additions and 26 deletions.
104 changes: 78 additions & 26 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,33 @@ git clone https://github.com/hbq969/hmis.git

2. 调整环境参数

`vim hmis-master/config/src/main/resources/static/.env`
- hmis-master/config/src/main/resources/static/.env

```properties
# ------------------------------------------------------------------------------
# This is an example .env file.
#
# All of these environment vars must be defined either in your environment or in
# a local .env file in order to run the demo for this project.
# ------------------------------------------------------------------------------

# gateway
# VUE_APP_DEV_BASE_URL=http://192.168.56.2:20000/hmis/config/ui
# VUE_APP_PROD_BASE_URL=http://192.168.56.2:20000/hmis/config/ui

# development
# VUE_APP_DEV_BASE_URL=http://localhost:21000/ui
# VUE_APP_PROD_BASE_URL=http://localhost:21000/ui

# standalone
VUE_APP_DEV_BASE_URL=.
VUE_APP_PROD_BASE_URL=.

```



`vim hmis-master/config/src/main/resources/application.propeties`
- hmis-master/config/src/main/resources/application.propeties

```bash
# 数据库
Expand Down Expand Up @@ -59,6 +75,16 @@ zkSessionTimeoutMills=5000



- hmis-master/config/src/main/deploy/setenv.sh

```properties
export spring_cloud_zookeeper_enabled="false"
```





3. 构建打包

```bash
Expand All @@ -69,14 +95,25 @@ cd hmis-master/config
mvn -skipTests=true clean package
```

![image-20230223110305342](README/image/README/image-20230223110305342.png)
![image-20230223120116304](README/image/README/image-20230223120116304-1677125212198.png)





4. 安装部署

- 本地

```bash
cd config-1.0/target
java -jar -Dspring_cloud_zookeeper_enabled=false config-1.0.jar
```

![image-20230223114951609](README/image/README/image-20230223114951609-1677125212199.png)



- vm

```bash
Expand Down Expand Up @@ -113,23 +150,38 @@ sh create.sh

调整环境参数

`vim hmis-master/config/src/main/resources/static/.env`
- hmis-master/config/src/main/resources/static/.env

```properties
# ------------------------------------------------------------------------------
# This is an example .env file.
#
# All of these environment vars must be defined either in your environment or in
# a local .env file in order to run the demo for this project.
# ------------------------------------------------------------------------------

# gateway
VUE_APP_DEV_BASE_URL=http://192.168.56.2:20000/hmis/config/ui
VUE_APP_PROD_BASE_URL=http://192.168.56.2:20000/hmis/config/ui

# development
# VUE_APP_DEV_BASE_URL=http://localhost:21000/ui
# VUE_APP_PROD_BASE_URL=http://localhost:21000/ui

# standalone
# VUE_APP_DEV_BASE_URL=.
# VUE_APP_PROD_BASE_URL=.
```



再在路由界面配置路由转发规则

![image-20230223094303870](README/image/README/image-20230223094303870.png)
![image-20230223094303870](README/image/README/image-20230223094303870-1677125212199.png)



![image-20230223094345730](README/image/README/image-20230223094345730.png)
![image-20230223094345730](README/image/README/image-20230223094345730-1677125212199.png)



Expand All @@ -143,59 +195,59 @@ VUE_APP_PROD_BASE_URL=http://192.168.56.2:20000/hmis/config/ui

http://192.168.56.2:21000/ui/index.html

![image-20230223094712116](README/image/README/image-20230223094712116.png)
![image-20230223094712116](README/image/README/image-20230223094712116-1677125212199.png)



- gateway模式

http://192.168.56.2:20000/hmis/config/ui/index.html

![image-20230223094804943](README/image/README/image-20230223094804943.png)
![image-20230223094804943](README/image/README/image-20230223094804943-1677125212199.png)





#### 配置显示

![image-20230218190638211](README/image/README/image-20230218190638211.png)
![image-20230218190638211](README/image/README/image-20230218190638211-1677125212199.png)



#### 创建目录

![image-20230218190734442](README/image/README/image-20230218190734442.png)
![image-20230218190734442](README/image/README/image-20230218190734442-1677125212199.png)





#### 新增配置

![image-20230218190810792](README/image/README/image-20230218190810792.png)
![image-20230218190810792](README/image/README/image-20230218190810792-1677125212199.png)



#### 批量删除配置

![image-20230218190856164](README/image/README/image-20230218190856164.png)
![image-20230218190856164](README/image/README/image-20230218190856164-1677125212199.png)





#### 删除单条配置

![image-20230218190923666](README/image/README/image-20230218190923666.png)
![image-20230218190923666](README/image/README/image-20230218190923666-1677125212199.png)



#### 导出配置

![image-20230219153156385](README/image/README/image-20230219153156385.png)
![image-20230219153156385](README/image/README/image-20230219153156385-1677125212199.png)

![image-20230219153232040](README/image/README/image-20230219153232040.png)
![image-20230219153232040](README/image/README/image-20230219153232040-1677125212200.png)



Expand All @@ -205,11 +257,11 @@ http://192.168.56.2:20000/hmis/config/ui/index.html

`ConfigUtils`工具类根据`springboot`配置文件生成`txt`文件

![image-20230221160409117](README/image/README/image-20230221160409117.png)
![image-20230221160409117](README/image/README/image-20230221160409117-1677125212200.png)

![image-20230218190953924](README/image/README/image-20230218190953924.png)
![image-20230218190953924](README/image/README/image-20230218190953924-1677125212200.png)

![image-20230218191011742](README/image/README/image-20230218191011742.png)
![image-20230218191011742](README/image/README/image-20230218191011742-1677125212200.png)

导入文件可通过工具类创建生成 `com.github.hbq.common.utils.ConfigUtils`

Expand All @@ -229,55 +281,55 @@ ConfigUtils.of("manage").build("xxx");

##### properties文件

![image-20230221160425061](README/image/README/image-20230221160425061.png)
![image-20230221160425061](README/image/README/image-20230221160425061-1677125212200.png)





![image-20230221184540201](README/image/README/image-20230221184540201.png)
![image-20230221184540201](README/image/README/image-20230221184540201-1677125212200.png)





##### yml文件

![image-20230221184905795](README/image/README/image-20230221184905795.png)
![image-20230221184905795](README/image/README/image-20230221184905795-1677125212200.png)



![image-20230221184735625](README/image/README/image-20230221184735625.png)
![image-20230221184735625](README/image/README/image-20230221184735625-1677125212200.png)



#### 配置查询

![image-20230218191240444](README/image/README/image-20230218191240444.png)
![image-20230218191240444](README/image/README/image-20230218191240444-1677125212200.png)





#### 操作日志查询

![image-20230218191321592](README/image/README/image-20230218191321592.png)
![image-20230218191321592](README/image/README/image-20230218191321592-1677125212200.png)





#### 备份恢复

![image-20230219153413216](README/image/README/image-20230219153413216.png)
![image-20230219153413216](README/image/README/image-20230219153413216-1677125212200.png)





#### 刷新应用配置

![image-20230220185443141](README/image/README/image-20230220185443141.png)
![image-20230220185443141](README/image/README/image-20230220185443141-1677125212200.png)



Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 554f611

Please sign in to comment.