Closed lukasz-cpu closed 10 months ago
This isn't something Spring can help with as Spring cannot wait on your infrastructure to be ready. You need to externally synchronize the services to ensure you start your application only once your MongoDB service is ready.
Understand, thanks for your answer. This is resolving problem. Best regards.
Hello,
I have output in my application:
In the above stacktrace we can see, that Mongo is trying to connect to the database when application is not fully set-up. When my application is fully set-up we can see that
INFO Monitor thread successfully connected to server with description
- it means success.I am using
Application is hosted on k8s with default configuration and properties are stored in k8s's secret.
and in the ConfigMap:
Here is the reference branch that I created. To run it please go to the root folder and run script: build-organisation-service.sh https://github.com/lukasz-cpu/Spring-Cloud-Kubernetes-Reference-Architecture-2024/tree/debug-error