L
- the location typepublic interface ConfigDataLocationResolver<L extends ConfigDataLocation>
locations
from a String
based location address. Implementations should be added as a spring.factories
entries. The following constructor parameter types are supported:
Log
- if the resolver needs deferred loggingBinder
- if the resolver needs to obtain values from the initial
Environment
ResourceLoader
- if the resolver needs a resource loader
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,
String location)
Returns if the specified location address can be resolved by this resolver.
|
List<L> |
resolve(ConfigDataLocationResolverContext context,
String location)
Resolve a location string into one or more
ConfigDataLocation instances. |
default List<L> |
resolveProfileSpecific(ConfigDataLocationResolverContext context,
String location,
Profiles profiles)
Resolve a location string into one or more
ConfigDataLocation instances
based on available profiles. |
boolean isResolvable(ConfigDataLocationResolverContext context, String location)
context
- the location resolver contextlocation
- the location to check.List<L> resolve(ConfigDataLocationResolverContext context, String location)
ConfigDataLocation
instances.context
- the location resolver contextlocation
- the location that should be resolveddefault List<L> resolveProfileSpecific(ConfigDataLocationResolverContext context, String location, Profiles profiles)
ConfigDataLocation
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 information