类 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 newStandardConfigDataLocationResolver
instance. -
方法概要
修饰符和类型方法说明int
getOrder()
boolean
isResolvable
(ConfigDataLocationResolverContext context, ConfigDataLocation location) Returns if the specified location address can be resolved by this resolver.resolve
(ConfigDataLocationResolverContext context, ConfigDataLocation location) Resolve aConfigDataLocation
into one or moreConfigDataResource
instances.resolveProfileSpecific
(ConfigDataLocationResolverContext context, ConfigDataLocation location, Profiles profiles) Resolve aConfigDataLocation
into one or moreConfigDataResource
instances based on available profiles.
-
构造器详细资料
-
StandardConfigDataLocationResolver
public StandardConfigDataLocationResolver(DeferredLogFactory logFactory, Binder binder, ResourceLoader resourceLoader) Create a newStandardConfigDataLocationResolver
instance.- 参数:
logFactory
- the factory for loggers to usebinder
- a binder backed by the initialEnvironment
resourceLoader
- aResourceLoader
used to load resources
-
-
方法详细资料
-
getOrder
public int getOrder() -
isResolvable
从接口复制的说明:ConfigDataLocationResolver
Returns 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 从接口复制的说明:ConfigDataLocationResolver
Resolve aConfigDataLocation
into one or moreConfigDataResource
instances.- 指定者:
resolve
在接口中ConfigDataLocationResolver<StandardConfigDataResource>
- 参数:
context
- the location resolver contextlocation
- the location that should be resolved- 返回:
- a list of
resources
in ascending priority order. - 抛出:
ConfigDataNotFoundException
-
resolveProfileSpecific
public List<StandardConfigDataResource> resolveProfileSpecific(ConfigDataLocationResolverContext context, ConfigDataLocation location, Profiles profiles) 从接口复制的说明:ConfigDataLocationResolver
Resolve aConfigDataLocation
into one or moreConfigDataResource
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
在接口中ConfigDataLocationResolver<StandardConfigDataResource>
- 参数:
context
- the location resolver contextlocation
- the location that should be resolvedprofiles
- profile information- 返回:
- a list of resolved locations in ascending priority order.
-