|
|
|
@ -242,7 +242,7 @@ public class ProviderApplication {
|
|
|
|
|
|
|
|
|
|
[source,subs="normal"]
|
|
|
|
|
----
|
|
|
|
|
in develop-evn enviroment; user name :nacos-config-yaml-update; age: 68
|
|
|
|
|
in develop-env enviroment; user name :nacos-config-yaml-update; age: 68
|
|
|
|
|
2018-11-02 15:34:25.013 INFO 33014 --- [ Thread-11] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6f1c29b7: startup date [Fri Nov 02 15:33:57 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@63355449
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
@ -275,7 +275,7 @@ in product-env enviroment; user name :nacos-config-yaml-update; age: 68
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NOTE: 此案例中我们通过 `spring.profiles.active=****` 的方式写死在配置文件中,而在真正的项目实施过程中这个变量的值是需要不同环境而有不同的值。这个时候通常的做法是通过 `-Dspring.profiles.active=****` 参数指定其配置来达到环境间灵活的切换。
|
|
|
|
|
NOTE: 此案例中我们通过 `spring.profiles.active=<profilename>` 的方式写死在配置文件中,而在真正的项目实施过程中这个变量的值是需要不同环境而有不同的值。这个时候通常的做法是通过 `-Dspring.profiles.active=<profile>` 参数指定其配置来达到环境间灵活的切换。
|
|
|
|
|
|
|
|
|
|
=== 支持自定义 namespace 的配置
|
|
|
|
|
首先看一下 Nacos 的 Namespace 的概念, https://nacos.io/zh-cn/docs/concepts.html[Nacos 概念]
|
|
|
|
|