Add global optional config data opt-out
Support a `spring.config.all-locations-optional` property which can be set to `true` if all config data locations should be considered optional. Closes gh-23097
This commit is contained in:
@@ -623,6 +623,9 @@ You can use this prefix with the `spring.config.location` and `spring.config.add
|
||||
|
||||
For example, a `spring.config.import` value of `optional:file:./myconfig.properties` allows your application to start, even if the `myconfig.properties` file is missing.
|
||||
|
||||
If you want all locations to be considered optional, you can use the `spring.config.all-locations-optional` property.
|
||||
Set the value to `true` using `SpringApplication.setDefaultProperties(...)` or with a system/environment variable.
|
||||
|
||||
|
||||
|
||||
[[boot-features-external-config-files-wildcards]]
|
||||
|
||||
Reference in New Issue
Block a user