Cannot disable Spring Cloud Config via spring.cloud.config.enabled:false

后端 未结 5 1519
无人及你
无人及你 2021-01-04 03:51

Let me preface this by saying that I\'m not using Spring Cloud Config directly, it is transitive via Spring Cloud Hystrix starter.

When only using @EnableHystr

5条回答
  •  一整个雨季
    2021-01-04 04:43

    • You can put a bootstrap properties or yml to your resource direcotry or your applications directory and add spring.cloud.config.enabled=false. OR
    • You can disable spring cloud config server client by adding an environment variable: SPRING_CLOUD_CONFIG_ENABLED=false OR
    • Config server client can be disabled by adding a parameter to your app, if you pass the args to parameters to SpringApplication.run:

      public static void main(String[] args) throws Exception { SpringApplication.run(YourApplication.class, args); }

      and start the app by:

      java -jar yourapplication.jar --spring.cloud.config.enabled=false

提交回复
热议问题