类 StandardConfigDataLocationResolver
java.lang.Object
org.springframework.boot.context.config.StandardConfigDataLocationResolver
public class StandardConfigDataLocationResolver
extends Object
implements ConfigDataLocationResolver<StandardConfigDataResource>, Ordered
ConfigDataLocationResolver for standard locations.- 从以下版本开始:
- 2.4.0
- 作者:
- Madhura Bhave, Phillip Webb, Scott Frederick
-
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器构造器说明StandardConfigDataLocationResolver(DeferredLogFactory logFactory, Binder binder, ResourceLoader resourceLoader) Create a newStandardConfigDataLocationResolverinstance. -
方法概要
修饰符和类型方法说明intgetOrder()booleanisResolvable(ConfigDataLocationResolverContext context, ConfigDataLocation location) Returns if the specified location address can be resolved by this resolver.resolve(ConfigDataLocationResolverContext context, ConfigDataLocation location) Resolve aConfigDataLocationinto one or moreConfigDataResourceinstances.resolveProfileSpecific(ConfigDataLocationResolverContext context, ConfigDataLocation location, Profiles profiles) Resolve aConfigDataLocationinto one or moreConfigDataResourceinstances based on available profiles.
-
构造器详细资料
-
StandardConfigDataLocationResolver
public StandardConfigDataLocationResolver(DeferredLogFactory logFactory, Binder binder, ResourceLoader resourceLoader) Create a newStandardConfigDataLocationResolverinstance.- 参数:
logFactory- the factory for loggers to usebinder- a binder backed by the initialEnvironmentresourceLoader- aResourceLoaderused to load resources
-
-
方法详细资料
-
getOrder
public int getOrder() -
isResolvable
从接口复制的说明:ConfigDataLocationResolverReturns if the specified location address can be resolved by this resolver.- 指定者:
isResolvable在接口中ConfigDataLocationResolver<StandardConfigDataResource>- 参数:
context- the location resolver contextlocation- the location to check.- 返回:
- if the location is supported by this resolver
-
resolve
public List<StandardConfigDataResource> resolve(ConfigDataLocationResolverContext context, ConfigDataLocation location) throws ConfigDataNotFoundException 从接口复制的说明:ConfigDataLocationResolverResolve aConfigDataLocationinto one or moreConfigDataResourceinstances.- 指定者:
resolve在接口中ConfigDataLocationResolver<StandardConfigDataResource>- 参数:
context- the location resolver contextlocation- the location that should be resolved- 返回:
- a list of
resourcesin ascending priority order. - 抛出:
ConfigDataNotFoundException
-
resolveProfileSpecific
public List<StandardConfigDataResource> resolveProfileSpecific(ConfigDataLocationResolverContext context, ConfigDataLocation location, Profiles profiles) 从接口复制的说明:ConfigDataLocationResolverResolve aConfigDataLocationinto one or moreConfigDataResourceinstances 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在接口中ConfigDataLocationResolver<StandardConfigDataResource>- 参数:
context- the location resolver contextlocation- the location that should be resolvedprofiles- profile information- 返回:
- a list of resolved locations in ascending priority order.
-