1 year ago
#382429
Griffith_WhiteHawk
Spring Cloud Consul Config not working with Spring Boot 2.6.6
I tried to follow the new changes with the latests versions of Spring, where the bootstrap.yaml has been removed, and use the "spring.config.import" property, but I am not able to make my application work (discovery is working fine, but not config server). I am doing so many tries and errors, so it does not make so much sense to copy my current properties, but I will give all the details, so maybe someone is able to identify what is going on:
- In my POM, there is already the next dependencies: "spring-cloud-starter-config", "spring-cloud-starter-consul-all", "spring-cloud-starter-consul-discovery" and "spring-cloud-starter-consul-config". Spring Cloud version is "2021.0.1" and Consul "3.1.0".
- Main class annotated with @EnableDiscoveryClient
- Using "application.properties-development", not YAML, and SPRING_PROFILES_ACTIVE=development
- Application name is "profiles"
- In my Consul instance, in the "Key / Value" section, I have the next structure: Consul Structure (/config/development/profiles and JSON with the properties to load).
- It would be nice that, as with the Cloud Config Server, if no property file is found, it would allow me to run the application.
Thank you in advance.
Cheers!
java
spring
spring-boot
consul
0 Answers
Your Answer