Spring Neo4j Data正在每次部署时销毁db

时间:2013-08-06 14:49:17

标签: spring neo4j spring-data-neo4j

我正在使用neo4j版本1.8.1spring-data-neo4j版本2.2.0. RELEASE

这是我的春天neo4j移民;

<?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>

在spring上下文(target / neo4j-db)中给出的位置中的db正在被销毁并再次创建。所以这是生产上的问题。在每次部署时,由于此问题,产品数据将从neo4j中删除。

我该如何解决这个问题?是否存在可以在春季上下文中设置的状态?

1 个答案:

答案 0 :(得分:2)

storeDirectory可能有问题吗?也许它被您的开发IDE删除了?尝试将商店目录移到目标文件夹之外。

相关问题