Developing Java Applications with Spring and Spring Boot
by Claudio Eduardo de Oliveira, Greg L. Turnquist, Alex Antonov
How it works...
As you learned from the section on environment configuration hierarchy, Spring Boot offers multiple ways of providing the configuration properties. Each of these is managed via an appropriate PropertySource implementation. We looked at how to create a custom implementation of PropertySource when we were implementing ApacheCommonsConfigurationPropertySource. Spring Boot already provides a SystemEnvironmentPropertySource implementation for us to use out of the box. This even gets automatically registered with the default implementation of the environment interface: the SystemEnvironment.
As the SystemEnvironment implementation provides a composite façade on top of a multitude of different PropertySource implementations, the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access