@dangao/bun-server 1.8.1 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/controller/controller.d.ts.map +1 -1
  2. package/dist/core/application.d.ts.map +1 -1
  3. package/dist/error/handler.d.ts.map +1 -1
  4. package/dist/index.js +98 -21
  5. package/dist/middleware/builtin/error-handler.d.ts.map +1 -1
  6. package/dist/middleware/builtin/logger.d.ts.map +1 -1
  7. package/dist/router/decorators.d.ts +10 -10
  8. package/dist/router/decorators.d.ts.map +1 -1
  9. package/dist/router/router.d.ts.map +1 -1
  10. package/docs/api.md +194 -81
  11. package/docs/extensions.md +53 -0
  12. package/docs/guide.md +243 -1
  13. package/docs/microservice-config-center.md +73 -74
  14. package/docs/microservice-nacos.md +89 -90
  15. package/docs/microservice-service-registry.md +85 -86
  16. package/docs/microservice.md +142 -137
  17. package/docs/request-lifecycle.md +45 -4
  18. package/docs/symbol-interface-pattern.md +106 -106
  19. package/docs/zh/api.md +458 -18
  20. package/docs/zh/extensions.md +53 -0
  21. package/docs/zh/guide.md +251 -4
  22. package/docs/zh/microservice-config-center.md +258 -0
  23. package/docs/zh/microservice-nacos.md +346 -0
  24. package/docs/zh/microservice-service-registry.md +306 -0
  25. package/docs/zh/microservice.md +680 -0
  26. package/docs/zh/request-lifecycle.md +43 -5
  27. package/package.json +1 -1
  28. package/src/controller/controller.ts +10 -2
  29. package/src/core/application.ts +11 -0
  30. package/src/error/handler.ts +17 -0
  31. package/src/middleware/builtin/error-handler.ts +10 -0
  32. package/src/middleware/builtin/logger.ts +17 -0
  33. package/src/router/decorators.ts +15 -15
  34. package/src/router/router.ts +18 -1
  35. package/tests/controller/path-combination.test.ts +135 -0
@@ -1,29 +1,29 @@
1
- # 配置中心使用指南
1
+ # Configuration Center Usage Guide
2
2
 
3
- 本文档介绍如何使用 Bun Server Framework 的配置中心功能。
3
+ This document introduces how to use the configuration center feature in Bun Server Framework.
4
4
 
5
- ## 目录
5
+ ## Table of Contents
6
6
 
7
- - [概述](#概述)
8
- - [快速开始](#快速开始)
9
- - [基本使用](#基本使用)
10
- - [配置热更新](#配置热更新)
11
- - [ConfigModule 集成](#configmodule-集成)
12
- - [装饰器使用](#装饰器使用)
13
- - [最佳实践](#最佳实践)
7
+ - [Overview](#overview)
8
+ - [Quick Start](#quick-start)
9
+ - [Basic Usage](#basic-usage)
10
+ - [Hot Configuration Update](#hot-configuration-update)
11
+ - [ConfigModule Integration](#configmodule-integration)
12
+ - [Decorator Usage](#decorator-usage)
13
+ - [Best Practices](#best-practices)
14
14
 
15
- ## 概述
15
+ ## Overview
16
16
 
17
- 配置中心提供了集中式配置管理能力,支持:
17
+ The configuration center provides centralized configuration management capabilities, supporting:
18
18
 
19
- - **动态配置**:从配置中心获取配置,支持配置热更新
20
- - **多环境支持**:通过命名空间和分组管理不同环境的配置
21
- - **配置优先级**:配置中心配置 > 环境变量 > 默认配置
22
- - **配置监听**:监听配置变更,自动刷新应用配置
19
+ - **Dynamic Configuration**: Fetch configurations from the configuration center with hot update support
20
+ - **Multi-Environment Support**: Manage configurations for different environments through namespaces and groups
21
+ - **Configuration Priority**: Config center > Environment variables > Default configuration
22
+ - **Configuration Watching**: Watch for configuration changes and automatically refresh application configuration
23
23
 
24
- ## 快速开始
24
+ ## Quick Start
25
25
 
26
- ### 1. 注册配置中心模块
26
+ ### 1. Register Configuration Center Module
27
27
 
28
28
  ```typescript
29
29
  import { Application } from '@dangao/bun-server';
@@ -41,13 +41,13 @@ app.registerModule(
41
41
  username: 'nacos',
42
42
  password: 'nacos',
43
43
  },
44
- watchInterval: 3000, // 配置轮询间隔(毫秒)
44
+ watchInterval: 3000, // Configuration polling interval (milliseconds)
45
45
  },
46
46
  }),
47
47
  );
48
48
  ```
49
49
 
50
- ### 2. 使用配置中心
50
+ ### 2. Use Configuration Center
51
51
 
52
52
  ```typescript
53
53
  import {
@@ -72,15 +72,15 @@ class MyService {
72
72
  }
73
73
  ```
74
74
 
75
- ## 基本使用
75
+ ## Basic Usage
76
76
 
77
- ### 获取配置
77
+ ### Get Configuration
78
78
 
79
79
  ```typescript
80
- // 基本用法
80
+ // Basic usage
81
81
  const config = await configCenter.getConfig('my-config', 'DEFAULT_GROUP');
82
82
 
83
- // 指定命名空间
83
+ // Specify namespace
84
84
  const config = await configCenter.getConfig(
85
85
  'my-config',
86
86
  'DEFAULT_GROUP',
@@ -88,20 +88,20 @@ const config = await configCenter.getConfig(
88
88
  );
89
89
  ```
90
90
 
91
- ### 配置结果
91
+ ### Configuration Result
92
92
 
93
- `getConfig` 返回 `ConfigResult` 对象:
93
+ `getConfig` returns a `ConfigResult` object:
94
94
 
95
95
  ```typescript
96
96
  interface ConfigResult {
97
- content: string; // 配置内容
98
- md5: string; // 配置 MD5(用于判断是否变更)
99
- lastModified: number; // 最后修改时间(时间戳)
100
- contentType: string; // 内容类型
97
+ content: string; // Configuration content
98
+ md5: string; // Configuration MD5 (for change detection)
99
+ lastModified: number; // Last modified time (timestamp)
100
+ contentType: string; // Content type
101
101
  }
102
102
  ```
103
103
 
104
- ### 监听配置变更
104
+ ### Watch Configuration Changes
105
105
 
106
106
  ```typescript
107
107
  const unsubscribe = configCenter.watchConfig(
@@ -109,37 +109,37 @@ const unsubscribe = configCenter.watchConfig(
109
109
  'DEFAULT_GROUP',
110
110
  (newConfig) => {
111
111
  console.log('Config updated:', newConfig.content);
112
- // 更新应用配置
112
+ // Update application configuration
113
113
  updateAppConfig(JSON.parse(newConfig.content));
114
114
  },
115
115
  );
116
116
 
117
- // 取消监听
117
+ // Unsubscribe
118
118
  unsubscribe();
119
119
  ```
120
120
 
121
- ## 配置热更新
121
+ ## Hot Configuration Update
122
122
 
123
- 配置中心支持配置热更新,通过轮询机制检测配置变更:
123
+ The configuration center supports hot configuration updates through a polling mechanism to detect configuration changes:
124
124
 
125
125
  ```typescript
126
126
  ConfigCenterModule.forRoot({
127
127
  provider: 'nacos',
128
128
  nacos: {
129
- watchInterval: 3000, // 3 秒检查一次配置变更
129
+ watchInterval: 3000, // Check for configuration changes every 3 seconds
130
130
  },
131
131
  });
132
132
 
133
- // 监听配置变更
133
+ // Watch configuration changes
134
134
  configCenter.watchConfig('my-config', 'DEFAULT_GROUP', (newConfig) => {
135
- // 配置变更时自动调用
135
+ // Automatically called when configuration changes
136
136
  console.log('Config hot updated:', newConfig.content);
137
137
  });
138
138
  ```
139
139
 
140
- ## ConfigModule 集成
140
+ ## ConfigModule Integration
141
141
 
142
- ConfigModule 支持与配置中心深度集成,配置变更会自动刷新 ConfigService
142
+ ConfigModule supports deep integration with the configuration center, automatically refreshing ConfigService when configurations change:
143
143
 
144
144
  ```typescript
145
145
  import { ConfigModule } from '@dangao/bun-server';
@@ -157,11 +157,11 @@ ConfigModule.forRoot({
157
157
  ['app.name', { dataId: 'app-name', groupName: 'DEFAULT_GROUP' }],
158
158
  ['app.port', { dataId: 'app-port', groupName: 'DEFAULT_GROUP' }],
159
159
  ]),
160
- configCenterPriority: true, // 配置中心配置优先级最高
160
+ configCenterPriority: true, // Config center has highest priority
161
161
  },
162
162
  });
163
163
 
164
- // 使用 ConfigService
164
+ // Use ConfigService
165
165
  import { CONFIG_SERVICE_TOKEN, ConfigService } from '@dangao/bun-server';
166
166
 
167
167
  @Injectable()
@@ -171,22 +171,22 @@ class MyService {
171
171
  ) {}
172
172
 
173
173
  public getAppName() {
174
- // 自动从配置中心获取,配置变更时自动更新
174
+ // Automatically fetched from config center, auto-updated on changes
175
175
  return this.config.get<string>('app.name');
176
176
  }
177
177
  }
178
178
  ```
179
179
 
180
- ### 配置优先级
180
+ ### Configuration Priority
181
181
 
182
- - `configCenterPriority: true`(默认):配置中心 > 环境变量 > 默认配置
183
- - `configCenterPriority: false`:默认配置 > 环境变量 > 配置中心
182
+ - `configCenterPriority: true` (default): Config center > Environment variables > Default configuration
183
+ - `configCenterPriority: false`: Default configuration > Environment variables > Config center
184
184
 
185
- ## 装饰器使用
185
+ ## Decorator Usage
186
186
 
187
187
  ### @ConfigCenterValue
188
188
 
189
- 自动注入配置值:
189
+ Automatically inject configuration values:
190
190
 
191
191
  ```typescript
192
192
  import { ConfigCenterValue, Injectable } from '@dangao/bun-server';
@@ -195,19 +195,19 @@ import { ConfigCenterValue, Injectable } from '@dangao/bun-server';
195
195
  class MyService {
196
196
  @ConfigCenterValue('app-name', 'DEFAULT_GROUP', {
197
197
  defaultValue: 'MyApp',
198
- watch: true, // 监听配置变更
198
+ watch: true, // Watch for configuration changes
199
199
  })
200
200
  public appName: string = '';
201
201
 
202
202
  public getAppName() {
203
- return this.appName; // 自动从配置中心获取
203
+ return this.appName; // Automatically fetched from config center
204
204
  }
205
205
  }
206
206
  ```
207
207
 
208
208
  ### @NacosValue
209
209
 
210
- Nacos 特定的配置值注入(便捷别名):
210
+ Nacos-specific configuration value injection (convenience alias):
211
211
 
212
212
  ```typescript
213
213
  import { NacosValue, Injectable } from '@dangao/bun-server';
@@ -221,38 +221,37 @@ class MyService {
221
221
  }
222
222
  ```
223
223
 
224
- ## 最佳实践
224
+ ## Best Practices
225
225
 
226
- ### 1. 配置组织
226
+ ### 1. Configuration Organization
227
227
 
228
- - **命名空间**:用于区分不同环境(devtestprod
229
- - **分组**:用于逻辑分组(DEFAULT_GROUPDATABASE_GROUP 等)
230
- - **DataId**:配置的唯一标识
228
+ - **Namespace**: Used to distinguish different environments (dev, test, prod)
229
+ - **Group**: Used for logical grouping (DEFAULT_GROUP, DATABASE_GROUP, etc.)
230
+ - **DataId**: Unique identifier for configuration
231
231
 
232
- ### 2. 配置格式
232
+ ### 2. Configuration Format
233
233
 
234
- - 推荐使用 JSON 格式存储配置
235
- - 支持纯文本配置(如 propertiesyaml 等)
234
+ - Recommended to use JSON format for storing configurations
235
+ - Supports plain text configurations (such as properties, yaml, etc.)
236
236
 
237
- ### 3. 配置监听
237
+ ### 3. Configuration Watching
238
238
 
239
- - 为关键配置启用监听(`watch: true`)
240
- - 配置变更时及时更新应用状态
241
- - 避免频繁的配置变更
239
+ - Enable watching for critical configurations (`watch: true`)
240
+ - Update application state promptly when configurations change
241
+ - Avoid frequent configuration changes
242
242
 
243
- ### 4. 错误处理
243
+ ### 4. Error Handling
244
244
 
245
- - 配置获取失败时使用默认值
246
- - 记录配置获取错误日志
247
- - 实现配置降级策略
245
+ - Use default values when configuration fetch fails
246
+ - Log configuration fetch errors
247
+ - Implement configuration fallback strategies
248
248
 
249
- ### 5. 性能优化
249
+ ### 5. Performance Optimization
250
250
 
251
- - 合理设置 `watchInterval`(建议 3-10 秒)
252
- - 使用配置缓存减少 API 调用
253
- - 批量获取配置(如果支持)
251
+ - Set `watchInterval` reasonably (recommended 3-10 seconds)
252
+ - Use configuration caching to reduce API calls
253
+ - Batch fetch configurations (if supported)
254
254
 
255
- ## 示例
256
-
257
- 完整示例请参考 `examples/microservice-app.ts`。
255
+ ## Examples
258
256
 
257
+ For complete examples, please refer to `examples/microservice-app.ts`.
@@ -1,40 +1,40 @@
1
- # Nacos 集成文档
1
+ # Nacos Integration Documentation
2
2
 
3
- 本文档介绍如何在 Bun Server Framework 中使用 Nacos 作为配置中心和服务注册中心。
3
+ This document introduces how to use Nacos as a configuration center and service registry in Bun Server Framework.
4
4
 
5
- ## 目录
5
+ ## Table of Contents
6
6
 
7
- - [概述](#概述)
8
- - [Nacos 安装](#nacos-安装)
9
- - [配置中心集成](#配置中心集成)
10
- - [服务注册中心集成](#服务注册中心集成)
11
- - [完整示例](#完整示例)
12
- - [常见问题](#常见问题)
7
+ - [Overview](#overview)
8
+ - [Nacos Installation](#nacos-installation)
9
+ - [Configuration Center Integration](#configuration-center-integration)
10
+ - [Service Registry Integration](#service-registry-integration)
11
+ - [Complete Example](#complete-example)
12
+ - [Common Issues](#common-issues)
13
13
 
14
- ## 概述
14
+ ## Overview
15
15
 
16
- Bun Server Framework 通过 `@dangao/nacos-client` 包提供 Nacos 3.X 支持,包括:
16
+ Bun Server Framework provides Nacos 3.X support through the `@dangao/nacos-client` package, including:
17
17
 
18
- - **配置管理**:动态配置获取和监听
19
- - **服务注册**:服务实例注册、续约、注销
20
- - **服务发现**:服务实例查询和监听
21
- - **Open API**:基于 Nacos 3.X Open API 实现
18
+ - **Configuration Management**: Dynamic configuration fetching and watching
19
+ - **Service Registration**: Service instance registration, renewal, and deregistration
20
+ - **Service Discovery**: Service instance querying and watching
21
+ - **Open API**: Based on Nacos 3.X Open API implementation
22
22
 
23
- ## Nacos 安装
23
+ ## Nacos Installation
24
24
 
25
- ### Docker 安装(推荐)
25
+ ### Docker Installation (Recommended)
26
26
 
27
27
  ```bash
28
28
  docker run --name nacos -e MODE=standalone -p 8848:8848 nacos/nacos-server:v3.0.0
29
29
  ```
30
30
 
31
- ### 访问控制台
31
+ ### Access Console
32
32
 
33
- 访问 http://localhost:8848/nacos,默认用户名/密码:`nacos/nacos`
33
+ Visit http://localhost:8848/nacos, default username/password: `nacos/nacos`
34
34
 
35
- ## 配置中心集成
35
+ ## Configuration Center Integration
36
36
 
37
- ### 1. 注册配置中心模块
37
+ ### 1. Register Configuration Center Module
38
38
 
39
39
  ```typescript
40
40
  import { Application } from '@dangao/bun-server';
@@ -52,21 +52,21 @@ app.registerModule(
52
52
  username: 'nacos',
53
53
  password: 'nacos',
54
54
  },
55
- watchInterval: 3000, // 配置轮询间隔(毫秒)
55
+ watchInterval: 3000, // Configuration polling interval (milliseconds)
56
56
  },
57
57
  }),
58
58
  );
59
59
  ```
60
60
 
61
- ### 2. Nacos 控制台创建配置
61
+ ### 2. Create Configuration in Nacos Console
62
62
 
63
- 1. 登录 Nacos 控制台
64
- 2. 进入"配置管理" -> "配置列表"
65
- 3. 点击"+"创建配置:
66
- - **Data ID**:`my-config`
67
- - **Group**:`DEFAULT_GROUP`
68
- - **配置格式**:`JSON`(或其他格式)
69
- - **配置内容**:
63
+ 1. Log in to Nacos console
64
+ 2. Go to "Configuration Management" -> "Configuration List"
65
+ 3. Click "+" to create configuration:
66
+ - **Data ID**: `my-config`
67
+ - **Group**: `DEFAULT_GROUP`
68
+ - **Configuration Format**: `JSON` (or other formats)
69
+ - **Configuration Content**:
70
70
  ```json
71
71
  {
72
72
  "app": {
@@ -76,7 +76,7 @@ app.registerModule(
76
76
  }
77
77
  ```
78
78
 
79
- ### 3. 使用配置
79
+ ### 3. Use Configuration
80
80
 
81
81
  ```typescript
82
82
  import {
@@ -102,18 +102,18 @@ class MyService {
102
102
  }
103
103
  ```
104
104
 
105
- ### 4. 配置热更新
105
+ ### 4. Hot Configuration Update
106
106
 
107
107
  ```typescript
108
108
  configCenter.watchConfig('my-config', 'DEFAULT_GROUP', (newConfig) => {
109
109
  console.log('Config updated:', newConfig.content);
110
- // 更新应用配置
110
+ // Update application configuration
111
111
  });
112
112
  ```
113
113
 
114
- ## 服务注册中心集成
114
+ ## Service Registry Integration
115
115
 
116
- ### 1. 注册服务注册中心模块
116
+ ### 1. Register Service Registry Module
117
117
 
118
118
  ```typescript
119
119
  import { ServiceRegistryModule } from '@dangao/bun-server';
@@ -128,15 +128,15 @@ app.registerModule(
128
128
  username: 'nacos',
129
129
  password: 'nacos',
130
130
  },
131
- heartbeatInterval: 5000, // 心跳间隔(毫秒)
131
+ heartbeatInterval: 5000, // Heartbeat interval (milliseconds)
132
132
  },
133
133
  }),
134
134
  );
135
135
  ```
136
136
 
137
- ### 2. 注册服务
137
+ ### 2. Register Service
138
138
 
139
- #### 使用装饰器(推荐)
139
+ #### Using Decorator (Recommended)
140
140
 
141
141
  ```typescript
142
142
  import { ServiceRegistry, Controller, GET } from '@dangao/bun-server';
@@ -156,10 +156,10 @@ class UserController {
156
156
 
157
157
  app.registerController(UserController);
158
158
  await app.listen(3000);
159
- // 服务会自动注册到 Nacos
159
+ // Service will be automatically registered to Nacos
160
160
  ```
161
161
 
162
- #### 手动注册
162
+ #### Manual Registration
163
163
 
164
164
  ```typescript
165
165
  import {
@@ -186,7 +186,7 @@ class MyService {
186
186
  }
187
187
  ```
188
188
 
189
- ### 3. 服务发现
189
+ ### 3. Service Discovery
190
190
 
191
191
  ```typescript
192
192
  import {
@@ -199,13 +199,13 @@ const instances = await serviceRegistry.getInstances('user-service', {
199
199
  namespaceId: 'public',
200
200
  });
201
201
 
202
- // 监听服务实例变更
202
+ // Watch for service instance changes
203
203
  serviceRegistry.watchInstances('user-service', (newInstances) => {
204
204
  console.log('Instances updated:', newInstances);
205
205
  });
206
206
  ```
207
207
 
208
- ## 完整示例
208
+ ## Complete Example
209
209
 
210
210
  ```typescript
211
211
  import { Application, Controller, GET, Injectable, Inject } from '@dangao/bun-server';
@@ -219,7 +219,7 @@ import {
219
219
  type ServiceRegistry,
220
220
  } from '@dangao/bun-server';
221
221
 
222
- // 注册配置中心
222
+ // Register configuration center
223
223
  ConfigCenterModule.forRoot({
224
224
  provider: 'nacos',
225
225
  nacos: {
@@ -232,7 +232,7 @@ ConfigCenterModule.forRoot({
232
232
  },
233
233
  });
234
234
 
235
- // 注册服务注册中心
235
+ // Register service registry
236
236
  ServiceRegistryModule.forRoot({
237
237
  provider: 'nacos',
238
238
  nacos: {
@@ -245,7 +245,7 @@ ServiceRegistryModule.forRoot({
245
245
  },
246
246
  });
247
247
 
248
- // 服务类
248
+ // Service class
249
249
  @Injectable()
250
250
  class UserService {
251
251
  private readonly serviceClient: ServiceClient;
@@ -266,7 +266,7 @@ class UserService {
266
266
  }
267
267
  }
268
268
 
269
- // 控制器
269
+ // Controller
270
270
  @ServiceRegistry('user-service', { port: 3000 })
271
271
  @Controller('/api/users')
272
272
  class UserController {
@@ -278,69 +278,68 @@ class UserController {
278
278
  }
279
279
  }
280
280
 
281
- // 启动应用
281
+ // Start application
282
282
  const app = new Application();
283
283
  app.registerController(UserController);
284
284
  await app.listen(3000);
285
285
  ```
286
286
 
287
- ## 常见问题
287
+ ## Common Issues
288
288
 
289
- ### 1. 连接失败
289
+ ### 1. Connection Failure
290
290
 
291
- **问题**:无法连接到 Nacos 服务器
291
+ **Issue**: Unable to connect to Nacos server
292
292
 
293
- **解决方案**:
294
- - 检查 Nacos 服务器是否运行
295
- - 检查 `serverList` 配置是否正确
296
- - 检查网络连接和防火墙设置
297
- - 检查用户名和密码是否正确
293
+ **Solutions**:
294
+ - Check if Nacos server is running
295
+ - Check if `serverList` configuration is correct
296
+ - Check network connection and firewall settings
297
+ - Check if username and password are correct
298
298
 
299
- ### 2. 配置获取失败
299
+ ### 2. Configuration Fetch Failure
300
300
 
301
- **问题**:无法获取配置
301
+ **Issue**: Unable to fetch configuration
302
302
 
303
- **解决方案**:
304
- - 检查配置是否在 Nacos 控制台中存在
305
- - 检查 Data ID Group 是否正确
306
- - 检查命名空间是否正确
307
- - 检查权限设置
303
+ **Solutions**:
304
+ - Check if configuration exists in Nacos console
305
+ - Check if Data ID and Group are correct
306
+ - Check if namespace is correct
307
+ - Check permission settings
308
308
 
309
- ### 3. 服务注册失败
309
+ ### 3. Service Registration Failure
310
310
 
311
- **问题**:服务无法注册到 Nacos
311
+ **Issue**: Service cannot be registered to Nacos
312
312
 
313
- **解决方案**:
314
- - 检查服务注册中心模块是否已注册
315
- - 检查服务名、IP、端口是否正确
316
- - 检查 Nacos 服务器连接是否正常
317
- - 查看应用日志获取详细错误信息
313
+ **Solutions**:
314
+ - Check if service registry module is registered
315
+ - Check if service name, IP, and port are correct
316
+ - Check if Nacos server connection is normal
317
+ - Check application logs for detailed error information
318
318
 
319
- ### 4. 服务发现为空
319
+ ### 4. Service Discovery Returns Empty
320
320
 
321
- **问题**:服务发现返回空列表
321
+ **Issue**: Service discovery returns empty list
322
322
 
323
- **解决方案**:
324
- - 检查服务是否已注册
325
- - 检查 `healthyOnly` 选项(如果设置为 true,只返回健康实例)
326
- - 检查命名空间和分组是否正确
327
- - 检查服务实例是否健康
323
+ **Solutions**:
324
+ - Check if service is registered
325
+ - Check `healthyOnly` option (if set to true, only healthy instances are returned)
326
+ - Check if namespace and group are correct
327
+ - Check if service instances are healthy
328
328
 
329
- ### 5. 配置热更新不生效
329
+ ### 5. Hot Configuration Update Not Working
330
330
 
331
- **问题**:配置变更后应用未更新
331
+ **Issue**: Application not updated after configuration changes
332
332
 
333
- **解决方案**:
334
- - 检查是否启用了配置监听(`watch: true`)
335
- - 检查 `watchInterval` 设置是否合理
336
- - 检查配置监听回调是否正确实现
337
- - 查看日志确认配置变更是否被检测到
333
+ **Solutions**:
334
+ - Check if configuration watching is enabled (`watch: true`)
335
+ - Check if `watchInterval` setting is reasonable
336
+ - Check if configuration watch callback is correctly implemented
337
+ - Check logs to confirm if configuration changes are detected
338
338
 
339
- ## 参考资源
339
+ ## Reference Resources
340
340
 
341
- - [Nacos 官方文档](https://nacos.io/docs/latest/)
341
+ - [Nacos Official Documentation](https://nacos.io/docs/latest/)
342
342
  - [Nacos 3.X Open API](https://nacos.io/docs/latest/manual/user/open-api/)
343
- - [微服务使用指南](./microservice.md)
344
- - [配置中心使用指南](./microservice-config-center.md)
345
- - [服务注册与发现使用指南](./microservice-service-registry.md)
346
-
343
+ - [Microservice Usage Guide](./microservice.md)
344
+ - [Configuration Center Usage Guide](./microservice-config-center.md)
345
+ - [Service Registration and Discovery Usage Guide](./microservice-service-registry.md)