Class NacosConfigDataLocationResolver
java.lang.Object
com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver
- All Implemented Interfaces:
org.springframework.boot.context.config.ConfigDataLocationResolver<NacosConfigDataResource>,org.springframework.core.Ordered
public class NacosConfigDataLocationResolver
extends Object
implements org.springframework.boot.context.config.ConfigDataLocationResolver<NacosConfigDataResource>, org.springframework.core.Ordered
Implementation of
ConfigDataLocationResolver, load Nacos
ConfigDataResource.- Since:
- 2021.0.1.0
- Author:
- freeman
-
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionNacosConfigDataLocationResolver(org.springframework.boot.logging.DeferredLogFactory logFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.commons.logging.LoggetLog()intgetOrder()protected StringbooleanisResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) protected NacosConfigPropertiesloadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext context) resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles)
-
Field Details
-
PREFIX
Prefix for Config Server imports.- See Also:
-
-
Constructor Details
-
NacosConfigDataLocationResolver
public NacosConfigDataLocationResolver(org.springframework.boot.logging.DeferredLogFactory logFactory)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
loadProperties
protected NacosConfigProperties loadProperties(org.springframework.boot.context.config.ConfigDataLocationResolverContext context) -
getLog
protected org.apache.commons.logging.Log getLog() -
isResolvable
public boolean isResolvable(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) - Specified by:
isResolvablein interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<NacosConfigDataResource>
-
getPrefix
-
resolve
public List<NacosConfigDataResource> resolve(org.springframework.boot.context.config.ConfigDataLocationResolverContext context, org.springframework.boot.context.config.ConfigDataLocation location) throws org.springframework.boot.context.config.ConfigDataLocationNotFoundException, org.springframework.boot.context.config.ConfigDataResourceNotFoundException - Specified by:
resolvein interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<NacosConfigDataResource>- Throws:
org.springframework.boot.context.config.ConfigDataLocationNotFoundExceptionorg.springframework.boot.context.config.ConfigDataResourceNotFoundException
-
resolveProfileSpecific
public List<NacosConfigDataResource> resolveProfileSpecific(org.springframework.boot.context.config.ConfigDataLocationResolverContext resolverContext, org.springframework.boot.context.config.ConfigDataLocation location, org.springframework.boot.context.config.Profiles profiles) throws org.springframework.boot.context.config.ConfigDataLocationNotFoundException - Specified by:
resolveProfileSpecificin interfaceorg.springframework.boot.context.config.ConfigDataLocationResolver<NacosConfigDataResource>- Throws:
org.springframework.boot.context.config.ConfigDataLocationNotFoundException
-