I have created Spring cloud config server to include all configurations of spring cloud config clients for my application, the problem is that my spring cloud config clients can not obtain the configurations from the spring cloud config server even if the server is started I don't know where I'm doing below are my code snapshots your suggestions will be much appreciated.
What I have tried:
Spring Cloud Config Server Main Method
@SpringBootApplication
@EnableConfigServer
public class DemoConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(DemoConfigServerApplication.class, args);
}
}
Configuration for Department service in Spring Cloud Config Server (demo-department-service.properties)
server.port = 8081
eureka.client.service-url.defaultZone = http:
management.tracing.sampling.probability = 1.0
Department Service (Spring Cloud Config Client) Main Method
@SpringBootApplication
@EnableDiscoveryClient
public class DemoDepartmentServiceApplication {
public static void main(String[] args) {
SpringApplication.run(DemoDepartmentServiceApplication.class, args);
}
}
application.properties in department service
spring.application.name = department-service
spring.config.import = configserver:http: