bindian0509 / microservices-complete

⭐️ A complete reference for building robust backend architecture in Java and Spring ⭐️
1 stars 0 forks source link

Server run failing with bootstrap.yml for config and app services #2

Closed bindian0509 closed 1 year ago

bindian0509 commented 1 year ago

The Reason Spring Cloud Config Client has changed and technically bootstrap.properties and bootstrap.yml files are deprecated.

Correct Solution Move all properties from boostrap.properties to application.properties (it can be .yml as well) Remove bootstrap.properties file Replace spring.cloud.config.uri=http://localhost:8888 with spring.config.import=configserver:http://localhost:8888 This is a proper way to tell you Spring Boot app that you want to load properties from the Spring Cloud Config service that is running on localhost:8888.