Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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://localhost:8761/eureka/
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://localhost:8088
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900