类 AnnotatedPropertySourceLoader<A extends java.lang.annotation.Annotation>
- java.lang.Object
-
- io.microsphere.spring.context.annotation.BeanCapableImportCandidate
-
- io.microsphere.spring.config.context.annotation.AnnotatedPropertySourceLoader<A>
-
- 类型参数:
A
- The type ofAnnotation
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.context.annotation.ImportSelector
,org.springframework.context.EnvironmentAware
,org.springframework.context.ResourceLoaderAware
- 直接已知子类:
PropertySourceExtensionLoader
public abstract class AnnotatedPropertySourceLoader<A extends java.lang.annotation.Annotation> extends BeanCapableImportCandidate implements org.springframework.context.annotation.ImportSelector
AbstractImportSelector
class to load thePropertySource
when theconfiguration
annotated the specified annotation- 从以下版本开始:
- 1.0.0
- 作者:
- Mercy
- 另请参阅:
ResourcePropertySourceLoader
,PropertySourceExtensionLoader
,ImportSelector
-
-
字段概要
字段 修饰符和类型 字段 说明 protected org.slf4j.Logger
logger
protected static java.lang.String
NAME_ATTRIBUTE_NAME
-
从类继承的字段 io.microsphere.spring.context.annotation.BeanCapableImportCandidate
beanFactory, classLoader, environment, resourceLoader
-
-
构造器概要
构造器 构造器 说明 AnnotatedPropertySourceLoader()
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected java.lang.String
buildDefaultPropertySourceName(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata)
Build the default name ofPropertySource
protected java.lang.String
buildPropertySourceName(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata)
Build the name ofPropertySource
java.lang.Class<A>
getAnnotationType()
The annotation typeprotected java.lang.String
getPropertySourceName()
protected abstract void
loadPropertySource(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata, java.lang.String propertySourceName, org.springframework.core.env.MutablePropertySources propertySources)
Load thePropertySource
protected java.lang.Class<A>
resolveAnnotationType()
protected java.lang.String
resolvePropertySourceName(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata)
Resolve the name ofPropertySource
java.lang.String[]
selectImports(org.springframework.core.type.AnnotationMetadata metadata)
-
从类继承的方法 io.microsphere.spring.context.annotation.BeanCapableImportCandidate
getBeanFactory, getClassLoader, getEnvironment, getResourceLoader, setBeanClassLoader, setBeanFactory, setEnvironment, setResourceLoader
-
-
-
-
字段详细资料
-
NAME_ATTRIBUTE_NAME
protected static final java.lang.String NAME_ATTRIBUTE_NAME
- 另请参阅:
- 常量字段值
-
logger
protected final org.slf4j.Logger logger
-
-
方法详细资料
-
resolveAnnotationType
protected java.lang.Class<A> resolveAnnotationType()
-
selectImports
public final java.lang.String[] selectImports(org.springframework.core.type.AnnotationMetadata metadata)
- 指定者:
selectImports
在接口中org.springframework.context.annotation.ImportSelector
-
resolvePropertySourceName
@NonNull protected final java.lang.String resolvePropertySourceName(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata)
Resolve the name ofPropertySource
- 参数:
attributes
-AnnotationAttributes
metadata
-AnnotationMetadata
- 返回:
- non-null
-
buildPropertySourceName
@Nullable protected java.lang.String buildPropertySourceName(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata)
Build the name ofPropertySource
- 参数:
attributes
-AnnotationAttributes
metadata
-AnnotationMetadata
- 返回:
- the attribute value of annotation if the
"name"
attribute present, ornull
-
buildDefaultPropertySourceName
@NonNull protected java.lang.String buildDefaultPropertySourceName(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata)
Build the default name ofPropertySource
- 参数:
attributes
-AnnotationAttributes
metadata
-AnnotationMetadata
- 返回:
- non-null
-
loadPropertySource
@Nullable protected abstract void loadPropertySource(org.springframework.core.annotation.AnnotationAttributes attributes, org.springframework.core.type.AnnotationMetadata metadata, java.lang.String propertySourceName, org.springframework.core.env.MutablePropertySources propertySources) throws java.lang.Throwable
Load thePropertySource
- 参数:
attributes
-AnnotationAttributes
metadata
-AnnotationMetadata
propertySourceName
- the name ofPropertySource
propertySources
-MutablePropertySources
to be added- 抛出:
java.lang.Throwable
- the failure of the loading
-
getAnnotationType
@NonNull public final java.lang.Class<A> getAnnotationType()
The annotation type- 返回:
- non-null
-
getPropertySourceName
protected java.lang.String getPropertySourceName()
-
-