From 259805b55e274091a7835e5ac2bd906d79729af1 Mon Sep 17 00:00:00 2001 From: Odboy Date: Fri, 10 Jul 2026 21:05:08 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=88=A0=E9=99=A4=20demo=20=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=9A=84=20README=EF=BC=8C=E4=BF=AE=E5=A4=8D=20Go=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=96=87=E6=A1=A3=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E5=8A=9F=E8=83=BD=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kenaito-conf-dotnet-client-demo/README.md | 41 ------------------- kenaito-conf-go-client/README.md | 2 - .../README.md | 41 ------------------- 3 files changed, 84 deletions(-) delete mode 100644 kenaito-conf-dotnet-client-demo/README.md delete mode 100644 kenaito-conf-springboot2-client-demo/README.md diff --git a/kenaito-conf-dotnet-client-demo/README.md b/kenaito-conf-dotnet-client-demo/README.md deleted file mode 100644 index ac7dd73..0000000 --- a/kenaito-conf-dotnet-client-demo/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Kenaito Config Center .NET Demo - -演示如何使用 kenaito-conf-dotnet-client 客户端库。 - -## 本地运行 - -```bash -cd kenaito-conf-dotnet-client-demo -dotnet run -``` - -## Docker 运行 - -```bash -# 在项目根目录执行 -docker build -f Dockerfile.dotnet -t kenaito-conf-dotnet-demo . - -docker run -it --rm \ - -e CONFIG_CENTER_BASE_URL=http://host.docker.internal:8080 \ - kenaito-conf-dotnet-demo -``` - -## 配置项 - -修改 `Program.cs` 中的配置: - -```csharp -var config = new Config -{ - BaseUrl = "http://localhost:8080", // 配置中心地址 - AppName = "kenaito-dotnet-demo", // 应用名称 - Env = "daily", // 环境 - SyncInterval = 10 // 同步间隔(秒) -}; -``` - -## 功能演示 - -- 启动时拉取全量配置并打印 -- 监听配置变更,实时输出变更内容 -- 按 Ctrl+C 优雅退出 diff --git a/kenaito-conf-go-client/README.md b/kenaito-conf-go-client/README.md index c3934e7..6d373b3 100644 --- a/kenaito-conf-go-client/README.md +++ b/kenaito-conf-go-client/README.md @@ -7,7 +7,6 @@ Go 语言的配置中心客户端 SDK。 - 从配置中心拉取应用配置 - 定时同步配置变更 - 支持配置变更回调监听 -- AES 解密支持(与 Java/Python 客户端兼容) - 本地文件缓存(配置中心不可用时降级) ## 安装 @@ -143,4 +142,3 @@ go run main.go 1. **Token 校验**:如果应用配置了 Token,需要在 `Config.Token` 中传入正确的 Token 值 2. **缓存文件**:客户端会在 `CacheDir` 目录下创建 `config-cache.json` 文件,用于配置中心不可用时降级 -3. **AES 解密**:配置值如果以 `{Cipher}` 开头,会自动使用 AES 解密,密钥由配置中心统一管理 diff --git a/kenaito-conf-springboot2-client-demo/README.md b/kenaito-conf-springboot2-client-demo/README.md deleted file mode 100644 index b072258..0000000 --- a/kenaito-conf-springboot2-client-demo/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# kenaito-conf-springboot2-client-demo - -配置中心客户端示例项目。 - -## 配置说明 - -在 `application.properties` 中配置: - -```properties -# 配置中心地址 -kenaito.config.server=http://localhost:8080 -kenaito.config.appName=demo -kenaito.config.env=dev -kenaito.config.version=latest -kenaito.config.profile=dev -``` - -## 运行步骤 - -1. 先安装 kenaito-conf-springboot2-client 到本地 Maven 仓库: -```bash -cd E:\SelfDev\Gitea2026\kenaito-conf\kenaito-conf-springboot2-client -mvn clean install -DskipTests -``` - -2. 运行示例项目: -```bash -cd E:\SelfDev\Gitea2026\kenaito-springboot-demo -mvn spring-boot:run -``` - -3. 访问测试: -```bash -curl http://localhost:8081/ -``` - -## 配置优先级 - -远程配置 > 本地配置 - -在配置中心添加应用 `demo` 的配置后,远程配置会覆盖本地同名配置。