3 ms·
Spring Boot is squarely down that road, too. It's no longer XML files, but YAML is no better. And it's impossible to find out which part of the magic is connect
by dmitriid 5y ago
Spring Boot is squarely down that road, too. It's no longer XML files, but YAML is no better. And it's impossible to find out which part of the magic is connected where, governed by which values etc. And when it fails, it's impossible to say why because it's all magically autowired and hidden.
Edit: Well, the whole "no idea how to configure a thing" is the common refrain of any and all Java frameworks. Pray that your IDE has enough smarts to autocomplete something for you.
- js8 5y agoI 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...
- davedx 5y ago> Well, the whole "no idea how to configure a thing" is the common refrain of any and all Java frameworks. Pray that your IDE has enough smarts to autocomplete something for you. I had to work with SAP Hybris a year or two ago. My IDE was not smart enough. Well actually I spent a good number of days trying to configure my IDE to be able to work properly with Hybris. I failed. What a mess
- smrtinsert 5y agoThe docs are very friendly on a module by module level.