+
@Configuration
+public class CustomConfigServiceBootstrapConfiguration {
+ @Bean
+ public ConfigClientProperties configClientProperties() {
+ ConfigClientProperties client = new ConfigClientProperties(this.environment);
+ client.setEnabled(false);
+ return client;
+ }
+
+ @Bean
+ public ConfigServicePropertySourceLocator configServicePropertySourceLocator() {
+ ConfigClientProperties clientProperties = configClientProperties();
+ ConfigServicePropertySourceLocator configServicePropertySourceLocator = new ConfigServicePropertySourceLocator(clientProperties);
+ configServicePropertySourceLocator.setRestTemplate(customRestTemplate(clientProperties));
+ return configServicePropertySourceLocator;
+ }
+}
+