Skip to content

Commit

Permalink
docs: update nacos config example (#3666)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruansheng8 authored Mar 28, 2024
1 parent 4de42b3 commit ce37b01
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-alibaba-examples/nacos-example/readme-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 的部分配置时,有以下四种方式:
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-alibaba-examples/nacos-example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ce37b01

Please sign in to comment.