R - the location typepublic interface ConfigDataLocationResolver<R extends ConfigDataResource>
locations into one or
more resources. Implementations should be added as a
spring.factories entries. The following constructor parameter types are
supported:
Log or DeferredLogFactory - if the resolver needs deferred
loggingBinder - if the resolver needs to obtain values from the initial
EnvironmentResourceLoader - if the resolver needs a resource loaderConfigurableBootstrapContext - 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).
Resolvers may implement Ordered or use the @Order annotation. The
first resolver that supports the given location will be used.
| Modifier and Type | Method and Description |
|---|---|
boolean |
isResolvable(ConfigDataLocationResolverContext context,
ConfigDataLocation location)
Returns if the specified location address can be resolved by this resolver.
|
List<R> |
resolve(ConfigDataLocationResolverContext context,
ConfigDataLocation location)
Resolve a
ConfigDataLocation into one or more ConfigDataResource
instances. |
default List<R> |
resolveProfileSpecific(ConfigDataLocationResolverContext context,
ConfigDataLocation location,
Profiles profiles)
Resolve a
ConfigDataLocation into one or more ConfigDataResource
instances based on available profiles. |
boolean isResolvable(ConfigDataLocationResolverContext context, ConfigDataLocation location)
context - the location resolver contextlocation - the location to check.List<R> resolve(ConfigDataLocationResolverContext context, ConfigDataLocation location) throws ConfigDataLocationNotFoundException, ConfigDataResourceNotFoundException
ConfigDataLocation into one or more ConfigDataResource
instances.context - the location resolver contextlocation - the location that should be resolvedresources in ascending priority order.ConfigDataLocationNotFoundException - on a non-optional location that cannot
be foundConfigDataResourceNotFoundException - if a resolved resource cannot be founddefault List<R> resolveProfileSpecific(ConfigDataLocationResolverContext context, ConfigDataLocation location, Profiles profiles) throws ConfigDataLocationNotFoundException
ConfigDataLocation into one or more ConfigDataResource
instances based on available profiles. This method is called once profiles have
been deduced from the contributed values. By default this method returns an empty
list.context - the location resolver contextlocation - the location that should be resolvedprofiles - profile informationConfigDataLocationNotFoundException - on a non-optional location that cannot
be found