@Configuration @API(status=STABLE, since="6.0") public abstract class AbstractReactiveNeo4jConfig extends Object
| Constructor and Description |
|---|
AbstractReactiveNeo4jConfig() |
| Modifier and Type | Method and Description |
|---|---|
abstract org.neo4j.driver.Driver |
driver()
The driver to be used for interacting with Neo4j.
|
protected Set<Class<?>> |
getInitialEntitySet()
Scans the mapping base package for classes annotated with
Node. |
protected Collection<String> |
getMappingBasePackages()
Returns the base packages to scan for Neo4j mapped entities at startup.
|
ReactiveNeo4jClient |
neo4jClient(org.neo4j.driver.Driver driver)
The driver used here should be the driver resulting from
driver(), which is the default. |
Neo4jConversions |
neo4jConversions() |
Neo4jMappingContext |
neo4jMappingContext(Neo4jConversions neo4JConversions)
Creates a
Neo4jMappingContext equipped with entity classes scanned from the mapping base package. |
ReactiveNeo4jTemplate |
neo4jTemplate(ReactiveNeo4jClient neo4jClient,
Neo4jMappingContext mappingContext,
ReactiveDatabaseSelectionProvider databaseNameProvider) |
protected ReactiveDatabaseSelectionProvider |
reactiveDatabaseSelectionProvider()
Configures the database name provider.
|
ReactiveTransactionManager |
reactiveTransactionManager(org.neo4j.driver.Driver driver,
ReactiveDatabaseSelectionProvider databaseNameProvider)
Provides a
PlatformTransactionManager for Neo4j based on the driver resulting from driver(). |
protected Set<Class<?>> |
scanForEntities(String basePackage)
Deprecated.
since 6.0.2 Use
Neo4jEntityScanner instead. |
public abstract org.neo4j.driver.Driver driver()
@Bean(value="reactiveNeo4jClient") public ReactiveNeo4jClient neo4jClient(org.neo4j.driver.Driver driver)
driver(), which is the default.driver - The driver to connect with.@Bean(value="reactiveNeo4jTemplate") public ReactiveNeo4jTemplate neo4jTemplate(ReactiveNeo4jClient neo4jClient, Neo4jMappingContext mappingContext, ReactiveDatabaseSelectionProvider databaseNameProvider)
@Bean(value="reactiveTransactionManager") public ReactiveTransactionManager reactiveTransactionManager(org.neo4j.driver.Driver driver, ReactiveDatabaseSelectionProvider databaseNameProvider)
PlatformTransactionManager for Neo4j based on the driver resulting from driver().driver - The driver to synchronize against@Bean protected ReactiveDatabaseSelectionProvider reactiveDatabaseSelectionProvider()
@Bean public Neo4jConversions neo4jConversions()
@Bean public Neo4jMappingContext neo4jMappingContext(Neo4jConversions neo4JConversions) throws ClassNotFoundException
Neo4jMappingContext equipped with entity classes scanned from the mapping base package.Neo4jMappingContext with initial classes to scan for entities set.ClassNotFoundExceptiongetMappingBasePackages()protected Collection<String> getMappingBasePackages()
com.acme.AppConfig extending Neo4jConfigurationSupport the base package will be considered
com.acme unless the method is overridden to implement alternate behavior.Node classes or an empty collection to not enable scanning for
entities.protected final Set<Class<?>> getInitialEntitySet() throws ClassNotFoundException
Node. By default, it scans for entities in all
packages returned by getMappingBasePackages().ClassNotFoundException - if the given class cannot be found in the class path.getMappingBasePackages()@Deprecated protected final Set<Class<?>> scanForEntities(String basePackage) throws ClassNotFoundException
Neo4jEntityScanner instead.Node.basePackage - must not be null.ClassNotFoundException - if the given class cannot be loaded by the class loader.Copyright © 2019–2021 Neo4j, Neo4j Sweden AB. All rights reserved.