@Configuration public abstract class AbstractCouchbaseDataConfiguration extends CouchbaseConfigurationSupport
CouchbaseConfigurer.
This is used by Spring boot to provide auto configuration support.| Constructor and Description |
|---|
AbstractCouchbaseDataConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureRepositoryOperationsMapping(RepositoryOperationsMapping mapping)
In order to customize the mapping between repositories/entity types to couchbase templates,
use the provided mapping's api (eg. in order to have different buckets backing different repositories).
|
protected abstract CouchbaseConfigurer |
couchbaseConfigurer() |
CouchbaseTemplate |
couchbaseTemplate()
Creates a
CouchbaseTemplate. |
RepositoryOperationsMapping |
repositoryOperationsMapping(CouchbaseTemplate couchbaseTemplate)
Creates the
RepositoryOperationsMapping bean which will be used by the framework to choose which
CouchbaseOperations should back which CouchbaseRepository. |
abbreviateFieldNames, couchbaseMappingContext, customConversions, fieldNamingStrategy, getDefaultConsistency, getInitialEntitySet, getMappingBasePackage, indexManager, mappingCouchbaseConverter, translationService, typeKeyprotected abstract CouchbaseConfigurer couchbaseConfigurer()
@Bean(name="couchbaseTemplate") public CouchbaseTemplate couchbaseTemplate() throws Exception
CouchbaseTemplate.
This uses CouchbaseConfigurationSupport.mappingCouchbaseConverter(), CouchbaseConfigurationSupport.translationService() and CouchbaseConfigurationSupport.getDefaultConsistency()
for construction.
Additionally, it will expect injection of a ClusterInfo and a Bucket beans from the context (most
probably from another configuration). For a self-sufficient configuration that defines such beans, see
AbstractCouchbaseConfiguration.Exception - on Bean construction failure.@Bean(name="couchbaseRepositoryOperationsMapping") public RepositoryOperationsMapping repositoryOperationsMapping(CouchbaseTemplate couchbaseTemplate) throws Exception
RepositoryOperationsMapping bean which will be used by the framework to choose which
CouchbaseOperations should back which CouchbaseRepository.
Override configureRepositoryOperationsMapping(RepositoryOperationsMapping) in order to customize this.Exceptionprotected void configureRepositoryOperationsMapping(RepositoryOperationsMapping mapping)
mapping - the default mapping (will associate all repositories to the default template).Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.