Hello!I'm working in a project related with neo4j. Now I'm trying to use spring-data neo4j and I have a big problem. My problem is about spring-data neo4j configuration. When I implement my app, I have to set some mapped-files size to launch tests, and this configuration is never loaded.I try to implement a bean like this:<bean id="graphDatabaseService"class="org.neo4j.kernel.EmbeddedGraphDatabase"destroy-method="shutdown" scope="singleton"><constructor-arg value="target/db" /><constructor-arg><map><entry key="use_memory_mapped_buffers" value="true" /><entry key="cache_type" value="none" /><entry key="neostore.nodestore.db.mapped_memory" value="10M" /><entry key="neostore.propertystore.db.mapped_memory" value="40M" /><entry key="neostore.relationshipstore.db.mapped_memory"value="2G" /><entry key="neostore.propertystore.db.index.keys.mapped_memory"value="5M" /><entry key="neostore.propertystore.db.index.mapped_memory"value="5M" /><entry key="neostore.propertystore.db.strings.mapped_memory"value="1M" /><entry key="neostore.propertystore.db.arrays.mapped_memory"value="0M" /></map></constructor-arg><neo4j:config graphDatabaseService="graphDatabaseService" />and, on the other hand, I try to read from a neo4j.properties or graph.db file but neither works.I'm looking for a solution that allows me set neo4j configuration, if someone can help me I'll be grateful.Thanks a lot.
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class GraphTest {
// @Value(value = "${spe.depth}")
private int maxDepth = 2;
private int TOTAL_IDS = 10000;
@Autowired
private GraphDatabaseService graphDatabaseService;
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/neo4j
http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd
">
<context:annotation-config />
<!-- Getting provided configuration -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations" value="graph-test.properties" />
</bean>
<bean id="graphDatabaseService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
destroy-method="shutdown">
<constructor-arg index="0" value="target/db" />
<constructor-arg index="1">
<map>
<entry key="use_memory_mapped_buffers" value="true" />
<entry key="cache_type" value="none" />
<entry key="neostore.nodestore.db.mapped_memory" value="10M" />
<entry key="neostore.propertystore.db.mapped_memory" value="40M" />
<entry key="neostore.relationshipstore.db.mapped_memory"
value="2G" />
<entry key="neostore.propertystore.db.index.keys.mapped_memory"
value="5M" />
<entry key="neostore.propertystore.db.index.mapped_memory"
value="5M" />
<entry key="neostore.propertystore.db.strings.mapped_memory"
value="1M" />
<entry key="neostore.propertystore.db.arrays.mapped_memory"
value="0M" />
</map>
</constructor-arg>
</bean>
<!-- Neo4j configuration (template) -->
<neo4j:config graphDatabaseService="graphDatabaseService" />
<neo4j:config storeDirectory="target/db" />
<!-- Package w/ automagic repositories -->
<neo4j:repositories base-package="neo4j" />
</beans>