Class RepositoryRegistrationAotProcessor
java.lang.Object
org.springframework.data.repository.config.RepositoryRegistrationAotProcessor
- All Implemented Interfaces:
BeanRegistrationAotProcessor,Aware,BeanFactoryAware,EnvironmentAware,EnvironmentCapable
public class RepositoryRegistrationAotProcessor
extends Object
implements BeanRegistrationAotProcessor, BeanFactoryAware, EnvironmentAware, EnvironmentCapable
BeanRegistrationAotProcessor responsible processing and providing AOT configuration for repositories.
Processes repository factory beans to provide generic type information to the
AOT tooling to allow deriving target type from the bean definition. If generic types do
not match due to customization of the factory bean by the user, at least the target repository type is provided via
the FactoryBean.OBJECT_TYPE_ATTRIBUTE.
With contribute(AotRepositoryContext, GenerationContext), stores can
provide custom logic for contributing additional (eg. reflection) configuration. By default, reflection configuration
will be added for types reachable from the repository declaration and query methods as well as all used
annotations from the org.springframework.data namespace.
RepositoryConfigurationExtension.getRepositoryAotProcessor() and
gets added by the RepositoryConfigurationDelegate.- Since:
- 3.0
- Author:
- Christoph Strobl, John Blum, Mark Paluch
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.aot.BeanRegistrationAotProcessor
IGNORE_REGISTRATION_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable RepositoryContributorcontribute(AotRepositoryContext repositoryContext, GenerationContext generationContext) protected voidcontributeType(Class<?> type, GenerationContext generationContext) protected ConfigurableListableBeanFactoryprotected org.apache.commons.logging.Logprotected @Nullable RepositoryConfiguration<?> protected voidprotected voidprotected @Nullable RepositoryRegistrationAotContributionnewRepositoryRegistrationAotContribution(RegisteredBean repositoryBean) @Nullable BeanRegistrationAotContributionvoidsetBeanFactory(BeanFactory beanFactory) voidsetConfigMap(Map<String, RepositoryConfiguration<?>> configMap) voidsetEnvironment(Environment environment) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.aot.BeanRegistrationAotProcessor
isBeanExcludedFromAotProcessing
-
Constructor Details
-
RepositoryRegistrationAotProcessor
public RepositoryRegistrationAotProcessor()
-
-
Method Details
-
processAheadOfTime
- Specified by:
processAheadOfTimein interfaceBeanRegistrationAotProcessor
-
contribute
protected @Nullable RepositoryContributor contribute(AotRepositoryContext repositoryContext, GenerationContext generationContext) -
newRepositoryRegistrationAotContribution
protected @Nullable RepositoryRegistrationAotContribution newRepositoryRegistrationAotContribution(RegisteredBean repositoryBean) -
setBeanFactory
- Specified by:
setBeanFactoryin interfaceBeanFactoryAware- Throws:
BeansException
-
setEnvironment
- Specified by:
setEnvironmentin interfaceEnvironmentAware
-
getEnvironment
- Specified by:
getEnvironmentin interfaceEnvironmentCapable
-
setConfigMap
-
getConfigMap
-
getBeanFactory
-
getRepositoryMetadata
-
contributeType
-
getLogger
protected org.apache.commons.logging.Log getLogger() -
logDebug
-
logTrace
-