Class CosmosConfigurationSupport
java.lang.Object
com.azure.spring.data.cosmos.config.CosmosConfigurationSupport
- Direct Known Subclasses:
AbstractCosmosConfiguration
A support class for cosmos configuration to scan beans and get initial entities
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeclare CosmosMappingContext bean.expressionResolver
(org.springframework.beans.factory.BeanFactory beanFactory) Declare ExpressionResolver bean.protected abstract String
Return the name of the database to connect toScan all base packages and get all beansprotected Collection<String>
Get the mapping base package name.scanForEntities
(String basePackage) Scan all beans under the given base package
-
Constructor Details
-
CosmosConfigurationSupport
public CosmosConfigurationSupport()
-
-
Method Details
-
getDatabaseName
Return the name of the database to connect to- Returns:
- must not be null.
-
expressionResolver
@Bean public ExpressionResolver expressionResolver(org.springframework.beans.factory.BeanFactory beanFactory) Declare ExpressionResolver bean.- Parameters:
beanFactory
- used to initialize the embeddedValueResolver- Returns:
- ExpressionResolver bean
-
cosmosMappingContext
Declare CosmosMappingContext bean.- Returns:
- CosmosMappingContext bean
- Throws:
ClassNotFoundException
- if the class type is invalid
-
getMappingBasePackages
Get the mapping base package name.- Returns:
- Base mapping package name set.
-
getInitialEntitySet
Scan all base packages and get all beans- Returns:
- initial entity set
- Throws:
ClassNotFoundException
- if the class type is invalid
-
scanForEntities
Scan all beans under the given base package- Parameters:
basePackage
- set the base location of beans- Returns:
- initial entity set for found beans
- Throws:
ClassNotFoundException
- if the class type is invalid
-