public class StandardConfigDataLocationResolver extends Object implements ConfigDataLocationResolver<StandardConfigDataResource>, Ordered
ConfigDataLocationResolver for standard locations.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
StandardConfigDataLocationResolver(Log logger,
Binder binder,
ResourceLoader resourceLoader)
Create a new
StandardConfigDataLocationResolver instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder() |
boolean |
isResolvable(ConfigDataLocationResolverContext context,
ConfigDataLocation location)
Returns if the specified location address can be resolved by this resolver.
|
List<StandardConfigDataResource> |
resolve(ConfigDataLocationResolverContext context,
ConfigDataLocation location)
Resolve a
ConfigDataLocation into one or more ConfigDataResource
instances. |
List<StandardConfigDataResource> |
resolveProfileSpecific(ConfigDataLocationResolverContext context,
ConfigDataLocation location,
Profiles profiles)
Resolve a
ConfigDataLocation into one or more ConfigDataResource
instances based on available profiles. |
public StandardConfigDataLocationResolver(Log logger, Binder binder, ResourceLoader resourceLoader)
StandardConfigDataLocationResolver instance.logger - the logger to usebinder - a binder backed by the initial EnvironmentresourceLoader - a ResourceLoader used to load resourcespublic boolean isResolvable(ConfigDataLocationResolverContext context, ConfigDataLocation location)
ConfigDataLocationResolverisResolvable in interface ConfigDataLocationResolver<StandardConfigDataResource>context - the location resolver contextlocation - the location to check.public List<StandardConfigDataResource> resolve(ConfigDataLocationResolverContext context, ConfigDataLocation location) throws ConfigDataNotFoundException
ConfigDataLocationResolverConfigDataLocation into one or more ConfigDataResource
instances.resolve in interface ConfigDataLocationResolver<StandardConfigDataResource>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 foundConfigDataNotFoundExceptionpublic List<StandardConfigDataResource> resolveProfileSpecific(ConfigDataLocationResolverContext context, ConfigDataLocation location, Profiles profiles)
ConfigDataLocationResolverConfigDataLocation 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.resolveProfileSpecific in interface ConfigDataLocationResolver<StandardConfigDataResource>context - the location resolver contextlocation - the location that should be resolvedprofiles - profile information