Reputation: 4683
I am using neo4j
version 1.8.1
and spring-data-neo4j
version 2.2.0. RELEASE
Here is my spring neo4j configration;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/data/neo4j http://www.springframework.org/schema/data/neo4j/spring-neo4j.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:spring-configured/>
<context:annotation-config/>
<neo4j:config storeDirectory="target/neo4j-db"/>
<neo4j:repositories base-package="net.myPackage.core"/>
<tx:annotation-driven mode="aspectj"/>
</beans>
The db in the location which is given in spring context (target/neo4j-db), is being destroyed and created again. So this is a problem on production. On every deploying, product datas are removed from neo4j because of this problem.
How can I fix this? Is there a status that is checking this that can I set in spring context?
Upvotes: 0
Views: 84
Reputation: 620
Maybe problem with storeDirectory
? Maybe it removed by your development IDE? Try to move store directory outside target folder.
Upvotes: 2