I am using a configuration for a Spring application for Authorization-service.
spring: application: name: authorization-service profiles: active: default cloud: config: profile: dev label: develop config: import: "optional:configserver:http://127.0.0.1:8888"
The file itself is available and is successfully displayed in the actuator at: http://127.0.0.7:8888/authorization-service/dev
If I run it locally, then everything works locally, but when in the form of a container, then I get the output:
14:23:05.201 [main] ERROR org.springframework.boot.SpringApplication -- Application run failed
org.springframework.cloud.config.client.ConfigClientFailFastException: Could not locate PropertySource and the resource is not optional, failing
at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.doLoad(ConfigServerConfigDataLoader.java:201)
at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.load(ConfigServerConfigDataLoader.java:102)
at org.springframework.cloud.config.client.ConfigServerConfigDataLoader.load(ConfigServerConfigDataLoader.java:61)
...
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://127.0.0.1:8888/application/default/develop": Connection refused
at org.springframework.web.client.RestTemplate.createResourceAccessException(RestTemplate.java:888)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:868)
Variables: