Class RepositoryRegistrationAotProcessor
java.lang.Object
org.springframework.data.repository.config.RepositoryRegistrationAotProcessor
- All Implemented Interfaces:
BeanRegistrationAotProcessor
,Aware
,BeanFactoryAware
public class RepositoryRegistrationAotProcessor
extends Object
implements BeanRegistrationAotProcessor, BeanFactoryAware
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
contribute
(AotRepositoryContext repositoryContext, GenerationContext generationContext) protected void
contributeType
(Class<?> type, GenerationContext generationContext) protected ConfigurableListableBeanFactory
protected Log
protected RepositoryConfiguration<?>
protected void
protected void
protected RepositoryRegistrationAotContribution
newRepositoryRegistrationAotContribution
(RegisteredBean repositoryBean) void
setBeanFactory
(BeanFactory beanFactory) void
setConfigMap
(Map<String, RepositoryConfiguration<?>> configMap) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.aot.BeanRegistrationAotProcessor
isBeanExcludedFromAotProcessing
-
Constructor Details
-
RepositoryRegistrationAotProcessor
public RepositoryRegistrationAotProcessor()
-
-
Method Details
-
processAheadOfTime
- Specified by:
processAheadOfTime
in interfaceBeanRegistrationAotProcessor
-
contribute
protected void contribute(AotRepositoryContext repositoryContext, GenerationContext generationContext) -
newRepositoryRegistrationAotContribution
protected RepositoryRegistrationAotContribution newRepositoryRegistrationAotContribution(RegisteredBean repositoryBean) -
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
getBeanFactory
-
setConfigMap
-
getConfigMap
-
getRepositoryMetadata
-
getLogger
-
logDebug
-
logTrace
-
contributeType
-