mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Merge pull request #1646 from SunJiFengPlus/master
fixed Nacos-config Doc.
This commit is contained in:
commit
584486c796
@ -25,6 +25,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
|
|||||||
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
|
spring.cloud.nacos.config.server-addr=127.0.0.1:8848
|
||||||
|
|
||||||
3. After completing the above two steps, the application will get the externalized configuration from Nacos Server and put it in the Spring Environment's PropertySources.We use the @Value annotation to inject the corresponding configuration into the userName and age fields of the SampleController, and add @RefreshScope to turn on dynamic refresh .
|
3. After completing the above two steps, the application will get the externalized configuration from Nacos Server and put it in the Spring Environment's PropertySources.We use the @Value annotation to inject the corresponding configuration into the userName and age fields of the SampleController, and add @RefreshScope to turn on dynamic refresh .
|
||||||
|
|
||||||
@RefreshScope
|
@RefreshScope
|
||||||
class SampleController {
|
class SampleController {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user