Fixed the errors in nacos-config-demo

pull/2291/head
chengpu.rzh 3 years ago
parent d886924ff3
commit 1a146c726e

@ -61,9 +61,9 @@
内容如下
user.id=1
user.name=james
user.age=17
user.id=1
user.name=james
user.age=17
### 应用启动
@ -117,7 +117,7 @@ Nacos Client 从 Nacos Server 端获取数据时,调用的是此接口 `Config
* `spring.profiles.active` 即为当前环境对应的 profile详情可以参考 [Spring Boot文档](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html#boot-features-profiles)
**注意,当 activeprofile 为空时,对应的连接符 `-` 也将不存在dataId 的拼接格式变成 `${prefix}`.`${file-extension}`**
**注意,当 active profile 为空时,对应的连接符 `-` 也将不存在dataId 的拼接格式变成 `${prefix}`.`${file-extension}`**
* `file-extension` 为配置内容的数据格式,可以通过配置项 `spring.cloud.nacos.config.file-extension`来配置。
目前只支持 `properties` 类型。
@ -153,7 +153,7 @@ Spring Boot 应用支持通过 Endpoint 来暴露相关信息Nacos Config Sta
Spring Boot 1.x 可以通过访问 http://127.0.0.1:18084/nacos_config 来查看 Nacos Endpoint 的信息。
Spring Boot 2.x 可以通过访问 http://127.0.0.1:18084/actuator/nacos-config 来访问。
Spring Boot 2.x 可以通过访问 http://127.0.0.1:18084/actuator/nacosconfig 来访问。
![actuator](https://cdn.nlark.com/lark/0/2018/png/54319/1536986344822-279e1edc-ebca-4201-8362-0ddeff240b85.png)

@ -62,9 +62,9 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
content is
user.id=1
user.name=james
user.age=17
user.id=1
user.name=james
user.age=17
### Start Application
@ -119,7 +119,7 @@ In Nacos Config Starter, the splicing format of dataId is as follows
* `spring.profiles.active` is the profile corresponding to the current environment. For details, please refer to [Spring Boot Doc](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html#boot-features-profiles)
**Note: when the activeprofile is empty, the corresponding connector `-` will also not exist, and the splicing format of the dataId becomes `${prefix}`.`${file-extension}`**
**Note: when the active profile is empty, the corresponding connector `-` will also not exist, and the splicing format of the dataId becomes `${prefix}`.`${file-extension}`**
* `file-extension` is the data format of the configuration content, which can be configured by the configuration item `spring.cloud.nacos.config.file-extension`.
Currently only the `properties` type is supported.
@ -139,7 +139,7 @@ By default, Nacos Config Starter adds a listening function to all Nacos configur
If you need to dynamically refresh a bean, please refer to the Spring and Spring Cloud specifications. It is recommended to add `@RefreshScope` or `@ConfigurationProperties ` annotations to the class.
Please refer to[ContextRefresher Java Doc](http://static.javadoc.io/org.springframework.cloud/spring-cloud-context/2.0.0.RELEASE/org/springframework/cloud/context/refresh/ContextRefresher.html) for more details.
Please refer to [ContextRefresher Java Doc](http://static.javadoc.io/org.springframework.cloud/spring-cloud-context/2.0.0.RELEASE/org/springframework/cloud/context/refresh/ContextRefresher.html) for more details.
@ -156,8 +156,8 @@ Spring Boot 1.x: Add configuration management.security.enabled=false
Spring Boot 2.x: Add configuration management.endpoints.web.exposure.include=*
To view the endpoint information, visit the following URLS:
Spring Boot1.x: Nacos Config Endpoint URL is http://127.0.0.1:18083/nacos_config.
Spring Boot2.x: Nacos Config Endpoint URL is http://127.0.0.1:18083/actuator/nacos-config.
Spring Boot 1.x: Nacos Config Endpoint URL is http://127.0.0.1:18084/nacos_config.
Spring Boot 2.x: Nacos Config Endpoint URL is http://127.0.0.1:18084/actuator/nacosconfig.
![actuator](https://cdn.nlark.com/lark/0/2018/png/54319/1536986344822-279e1edc-ebca-4201-8362-0ddeff240b85.png)

@ -34,5 +34,5 @@ spring.cloud.nacos.config.extension-configs[1].refresh=true
#spring.cloud.nacos.config.refresh-enabled=true
spring.cloud.nacos.config.refresh-enabled=true

Loading…
Cancel
Save