In my spring config server client, in "bootstrap.properties" i have mentioned the below, but it is not picking up the configurations from spring server:
spring.application.name=RestClientGreeter
spring.cloud.config.uri=http://localhost:8888
My config server runs at "http://localhost:8888" and while testing in Rest client it works perfectly fine
Get request in rest testing client: "http://localhost:8888/RestClientGreeter/default"
Output I get: { "name": "RestClientGreeter", "profiles": [ "default" ], "label": null, "version": "fdba8831b3eb54970f7f97eafdf1d606b8857318", "state": null, "propertySources": [ { "name": "file:////Users/partha/localgitrepo/RestClientGreeter.properties", "source": { "management.security.enabled": "false", "server.port": "12341", "eureka.client.service-url.defaultZone":"http://localhost:9865/eureka/" } } ], }
Logs:
2020-12-08 09:20:46.569 INFO 89553 --- [ restartedMain] c.e.demo.SpringRestClientApplication : No active profile set, falling back to default profiles: default 2020-12-08 09:20:46.669 INFO 89553 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2020-12-08 09:20:46.669 INFO 89553 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' 2020-12-08 09:20:47.887 WARN 89553 --- [ restartedMain] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format. 2020-12-08 09:20:48.045 INFO 89553 --- [ restartedMain] o.s.cloud.context.scope.GenericScope : BeanFactory id=4c5eeb67-2448-3311-bab7-3a4b24606f79 2020-12-08 09:20:48.080 INFO 89553 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'com.example.demo.GreetCaller' of type [org.springframework.cloud.openfeign.FeignClientFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-12-08 09:20:48.978 INFO 89553 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2020-12-08 09:20:48.993 INFO 89553 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2020-12-08 09:20:48.993 INFO 89553 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39] 2020-12-08 09:20:49.099 INFO 89553 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2020-12-08 09:20:49.099 INFO 89553 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2429 ms 2020-12-08 09:20:49.228 WARN 89553 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources. 2020-12-08 09:20:49.228 INFO 89553 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 2020-12-08 09:20:49.250 INFO 89553 --- [ restartedMain] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@dc91c88 2020-12-08 09:20:49.558 INFO 89553 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils (file:/Users/partha/.m2/repository/org/springframework/spring-core/5.3.1/spring-core-5.3.1.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2020-12-08 09:20:49.840 WARN 89553 --- [ restartedMain] o.s.c.n.a.ArchaiusAutoConfiguration : No spring.application.name found, defaulting to 'application' 2020-12-08 09:20:49.840 WARN 89553 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources. 2020-12-08 09:20:49.840 INFO 89553 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 2020-12-08 09:20:50.188 INFO 89553 --- [ restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2020-12-08 09:20:50.675 INFO 89553 --- [ restartedMain] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate. 2020-12-08 09:20:50.770 WARN 89553 --- [ restartedMain] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache, by adding it to the classpath. 2020-12-08 09:20:50.784 INFO 89553 --- [ restartedMain] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator' 2020-12-08 09:20:50.852 INFO 89553 --- [ restartedMain] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING 2020-12-08 09:20:50.922 INFO 89553 --- [ restartedMain] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1 2020-12-08 09:20:50.930 INFO 89553 --- [ restartedMain] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration