Spring cloud config client without auto configuration

孤者浪人 提交于 2019-12-13 15:19:11

问题


First, please allow me to acknowledge that I am new to Spring and also there are a few questions (Spring Cloud Config Client Without Spring Boot and spring-cloud-config client without Spring Boot) out there on Spring Cloud Config Client without Spring Boot. However, mine is a, well, a bit different...:)

  1. I definitely want to use Spring Config Client without Boot if possible. I have been trying it over the last couple of days and failed. If you have any examples, I would like to see. I can always call Rest API and parse JSON, but would like to use the Cloud Config Client instead.

  2. I am, however, not opposed to using Spring Boot. Although, it would be nice to convert my existing Spring MVC application to Boot (Traditional Development), how can I just use Cloud Config Client and Actuator (/refresh and other endpoints) dependencies with Boot and exclude other dependencies? If you have any working example, I would like to see.

EDIT: A bit more information for #2 since I do not have enough reputation for comments: @spencergibb, Thank you for answering #1. For #2, is it possible to exclude all the auto configurations in (/spring.factories) and just bring in config client and actuator dependencies only? Since @EnableAutoConfiguration has exclude attribute, though verbose, can it be used or are there alternatives?

Would you please guide me with examples, if any?

来源:https://stackoverflow.com/questions/36025227/spring-cloud-config-client-without-auto-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!