docs: update nacos config example (#3666)

pull/3669/head
ruansheng 11 months ago committed by GitHub
parent 4de42b3170
commit ce37b01696
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -12,7 +12,7 @@ spring:
password: 'nacos'
config:
import:
- nacos:nacos-config-example.properties?refresh=true
- nacos:nacos-config-example.properties?refreshEnabled=true
management:
endpoint:
health:

@ -138,7 +138,7 @@ nacos.core.auth.plugin.nacos.token.secret.key=SecretKey0123456789012345678901234
password: 'nacos'
config:
import:
- nacos:nacos-config-example.properties?refresh=true&group=DEFAULT_GROUP
- nacos:nacos-config-example.properties?refreshEnabled=true&group=DEFAULT_GROUP
```
3. 完成上述两步后,应用会从 Nacos Server 中获取相应的配置,并添加在 Spring Environment 的 PropertySources 中。使用 Nacos 配置中心保存 Nacos 的部分配置时,有以下四种方式:

@ -137,7 +137,7 @@ Before starting the application sample to demonstrate the project function, firs
password: 'nacos'
config:
import:
- nacos:nacos-config-example.properties?refresh=true&group=DEFAULT_GROUP
- nacos:nacos-config-example.properties?refreshEnabled=true&group=DEFAULT_GROUP
```
3. After completing the above two steps, the application will obtain the corresponding configuration from Nacos Server and add it to the Property Sources of Spring Environment. There are four ways to save a portion of the Nacos configuration using the Nacos Configuration Center:

Loading…
Cancel
Save