application properties
Settings a Spring Boot application reads at startup from files such as application.properties, environment variables and command-line arguments.
In more detail
Properties turn deployment choices into input rather than constants in source code. Later sources override earlier ones, so an environment variable can change a value from a file without rebuilding. Group related properties into a typed class with @ConfigurationProperties.
Examples
service.name=inventorySERVICE_TIMEOUTSECONDS=5 overrides service.timeoutSecondsRelated terms
- @ConfigurationProperties — The Spring Boot annotation that binds a group of properties sharing a prefix onto a typed class or record.
- Spring profile — A named set of configuration, such as local, test or production, that Spring activates to change properties and beans for one environment.
- environment variable — A named setting such as PORT=8000 that a program reads from its surroundings when it starts.
Taught in
- Spring Boot Auto Configuration — Modern Java: Virtual Threads & High-Throughput Services
- Configuration And Profiles — Modern Java: Virtual Threads & High-Throughput Services