L - the location typepublic interface ConfigDataLoader<L extends ConfigDataLocation>
ConfigData instances from a
location. Implementations should be added as a
spring.factories entries. The following constructor parameter types are
supported:
Log - if the resolver needs deferred loggingConfigurableBootstrapContext - A bootstrap context that can be used to
store objects that may be expensive to create, or need to be shared
(BootstrapContext or BootstrapRegistry may also be used).Multiple loaders cannot claim the same location.
| Modifier and Type | Method and Description |
|---|---|
default boolean |
isLoadable(ConfigDataLoaderContext context,
L location)
Returns if the specified location can be loaded by this instance.
|
ConfigData |
load(ConfigDataLoaderContext context,
L location)
Load
ConfigData for the given location. |
default boolean isLoadable(ConfigDataLoaderContext context, L location)
context - the loader contextlocation - the location to check.ConfigData load(ConfigDataLoaderContext context, L location) throws IOException, ConfigDataLocationNotFoundException
ConfigData for the given location.context - the loader contextlocation - the location to loadnull if the location should be skippedIOException - on IO errorConfigDataLocationNotFoundException - if the location cannot be found