@@ -60,6 +60,7 @@ import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import javax.enterprise.inject.Produces;
|
||||
|
||||
/**
|
||||
* Abstract base class for code based configuration of Spring managed Neo4j infrastructure.
|
||||
@@ -252,6 +253,7 @@ public abstract class Neo4jConfiguration {
|
||||
@Bean
|
||||
@Autowired
|
||||
@DependsOn("graphDatabaseService")
|
||||
@Produces
|
||||
public GraphDatabase graphDatabase() {
|
||||
if (graphDatabaseService instanceof GraphDatabase) return (GraphDatabase) graphDatabaseService;
|
||||
return new DelegatingGraphDatabase(graphDatabaseService);
|
||||
|
||||
@@ -63,6 +63,9 @@ public class DelegatingGraphDatabase implements GraphDatabase {
|
||||
private ResultConverter resultConverter;
|
||||
private volatile CypherQueryEngineImpl cypherQueryEngine;
|
||||
|
||||
public DelegatingGraphDatabase() {
|
||||
}
|
||||
|
||||
public DelegatingGraphDatabase(final GraphDatabaseService delegate) {
|
||||
this(delegate,null);
|
||||
}
|
||||
|
||||
5
spring-data-neo4j/src/main/resources/META-INF/beans.xml
Normal file
5
spring-data-neo4j/src/main/resources/META-INF/beans.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
|
||||
</beans>
|
||||
Reference in New Issue
Block a user