Merge remote-tracking branch 'upstream/master'
This commit is contained in:
1
pom.xml
1
pom.xml
@@ -157,6 +157,7 @@
|
||||
<module>spring-data-neo4j-examples/hello-worlds</module>
|
||||
<module>spring-data-neo4j-examples/imdb</module>
|
||||
<module>spring-data-neo4j-examples/cineasts</module>
|
||||
<module>spring-data-neo4j-examples/cineasts-rest</module>
|
||||
<module>spring-data-neo4j-examples/myrestaurants-social</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.neo4j.cineasts.movieimport.MovieDbImportService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.neo4j.support.GraphDatabaseContext;
|
||||
import org.springframework.data.neo4j.support.Neo4jTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -23,7 +23,7 @@ import static java.util.Arrays.asList;
|
||||
public class DatabasePopulator {
|
||||
|
||||
@Autowired
|
||||
GraphDatabaseContext ctx;
|
||||
Neo4jTemplate template;
|
||||
@Autowired
|
||||
CineastsRepository repository;
|
||||
|
||||
@@ -49,6 +49,6 @@ public class DatabasePopulator {
|
||||
|
||||
@Transactional
|
||||
public void cleanDb() {
|
||||
new Neo4jDatabaseCleaner((AbstractGraphDatabase) ctx.getGraphDatabaseService()).cleanDb();
|
||||
new Neo4jDatabaseCleaner((AbstractGraphDatabase) template.getGraphDatabaseService()).cleanDb();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user