Click here to Skip to main content
15,881,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm trying to create Micro-services architecture using spring boot, the only challenge I'm facing at the moment is how to configure spring cloud client to pull all the configurations from the config server, the config server gets all the configurations of the services from the native application as shown below.

What I have tried:

Configuration Server Application.Properties File

<pre>server.port = 8088
spring.profiles.active = native


Config Server Main Class

@SpringBootApplication
@EnableConfigServer
public class DemoConfigServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoConfigServerApplication.class, args);
    }

}


Demo department service.properties file inside Config server

server.port = 8081
eureka.client.service-url.defaultZone = http://localhost:8761/eureka/
management.tracing.sampling.probability = 1.0


Demo department service.properties file as a service

spring.application.name = department-service
spring.config.import = optional:configserver:http://localhost:8088


However the service can not get the configurations from the config server
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