docs(readme): 为所有客户端SDK补充本地容灾功能说明
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
|
||||
适用于 Spring Boot 2.x 应用的配置中心客户端,支持配置自动刷新和 `@Value` 注解动态更新。
|
||||
|
||||
## 功能特性
|
||||
|
||||
- 从配置中心拉取应用配置
|
||||
- 定时同步配置变更
|
||||
- 支持 `@Value` 注解动态刷新
|
||||
- 本地文件缓存(配置中心不可用时降级)
|
||||
|
||||
## 安装
|
||||
|
||||
### Maven 依赖
|
||||
@@ -158,6 +165,7 @@ Demo 默认配置:
|
||||
2. **配置优先级**:远程配置 > 本地配置 > 默认值
|
||||
3. **日志脱敏**:包含敏感键的配置在日志中会自动脱敏(显示前一半 + `****`)
|
||||
4. **网络异常**:同步失败时会记录错误日志,不影响应用正常运行
|
||||
5. **本地容灾**:客户端会在本地缓存目录下创建 `config-cache.log` 文件,当配置中心不可用时自动从缓存加载配置
|
||||
|
||||
## 版本历史
|
||||
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
Config center client for Spring Boot 2.x applications, supporting automatic config refresh and dynamic `@Value` annotation updates.
|
||||
|
||||
## Features
|
||||
|
||||
- Fetch application configs from the config center
|
||||
- Periodic config sync
|
||||
- Automatic `@Value` annotation refresh
|
||||
- Local file cache (fallback when config center is unavailable)
|
||||
|
||||
## Installation
|
||||
|
||||
### Maven Dependency
|
||||
@@ -156,6 +163,7 @@ Visit `http://localhost:8083/config` to view current configs.
|
||||
2. **Config Priority**: Remote config > Local config > Default value
|
||||
3. **Log Masking**: Configs containing sensitive keys are automatically masked in logs (first half + `****`)
|
||||
4. **Network Errors**: Sync failures are logged as errors without affecting normal application operation
|
||||
5. **Local Fallback**: The client creates a `config-cache.log` file in the local cache directory, automatically loading configs from cache when the config center is unavailable
|
||||
|
||||
## Changelog
|
||||
|
||||
|
||||
Reference in New Issue
Block a user