3 ms·
I cannot find that doc again but there was one with like 14 different places from which Spring Boot can read all its configuration from. No wonder it is hard to
by js8 5y ago
I cannot find that doc again but there was one with like 14 different places from which Spring Boot can read all its configuration from. No wonder it is hard to configure!
I don't think it should be a complicated problem. On startup, the framework should be able to tell you in a log file, what are all the places it read each configuration item from, and which value was finally used.
I am big fan of design philosophy where the computer tells you how it understood your commands (this includes configuration), before it does a thing.
- kaba0 5y agoSpring is not that hard to debug if you look at the logs. It is pretty exact in what is missing for example.
- papercrane 5y agoThe docs you're looking for is the externalized configuration section. 14 seems like a lot, but in reality you'll like use only a couple of layers in a production deployment. The reason there's so many is that list is exhaustive and includes sources only relevant to development and testing, as well there are a number of ways you may want to inject environment specific configuration values (command line flags, system properties, jndi, environment variables, etc..), you would normally just pick the one that made sense for your deployment environment. https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html https://docs.spring.io/spring-boot/docs/current/reference/ht...