Externalizing an environmental config using JSON

We have looked at a number of different ways to externally add or override the values of specific properties, either by using environment variables, system properties, or command-line arguments. All those options provide us with a great deal of flexibility, but with the exception of external property files, are all limited to setting one property at a time. When it comes to using property files, the syntax is not exactly the best at representing nested, hierarchical data structures, and can get a bit tricky. To avoid this situation, Spring Boot provides us with an ability to also pass, externally, JSON-encoded content containing an entire config hierarchy of settings.

In this recipe, we will use the same application executable that was used for the previous one, with the only difference being using external JSON content to set our configuration properties at runtime.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.229.253