DATAGRAPh-354 - Fixed configuration order to ensure correct MappingContext initialization.

Fixed test config after refactorings in Spring Data Neo4j core module. Polished pom slightly.
This commit is contained in:
Oliver Gierke
2013-06-06 08:49:41 +02:00
parent 8b16f7f9e8
commit 708fa6fea4
3 changed files with 5 additions and 3 deletions

View File

@@ -7,7 +7,6 @@
<name>Spring Data Neo4j - AspectJ Advanced Mapping</name>
<description>Advanced Mapping support for Spring Data Neo4j</description>
<version>2.3.0.BUILD-SNAPSHOT</version>
<parent>
<groupId>org.springframework.data</groupId>

View File

@@ -31,7 +31,7 @@
<bean id="conversionService" class="org.springframework.data.neo4j.fieldaccess.Neo4jConversionServiceFactoryBean"/>
<bean id="indexCreationMappingEventListener" class="org.springframework.data.neo4j.support.mapping.IndexCreationMappingEventListener">
<constructor-arg ref="template"/>
<constructor-arg ref="indexProvider" />
</bean>
@@ -57,6 +57,9 @@
<constructor-arg name="infrastructure" ref="mappingInfrastructure"/>
</bean>
<bean id="indexProvider" class="org.springframework.data.neo4j.support.index.IndexProviderImpl">
<constructor-arg ref="graphDatabase" />
</bean>
<bean id="entityStateHandler" class="org.springframework.data.neo4j.support.mapping.EntityStateHandler">
<constructor-arg ref="mappingContext"/>

View File

@@ -97,6 +97,7 @@ public abstract class Neo4jConfiguration {
}
@Bean
@DependsOn("neo4jMappingContext")
public MappingInfrastructureFactoryBean mappingInfrastructure() throws Exception {
MappingInfrastructureFactoryBean factoryBean = new MappingInfrastructureFactoryBean();
factoryBean.setGraphDatabaseService(getGraphDatabaseService());
@@ -253,7 +254,6 @@ public abstract class Neo4jConfiguration {
return new DelegatingGraphDatabase(graphDatabaseService);
}
// didn't help @DependsOn({"neo4jTemplate","neo4jTransactionManager","neo4jMappingContext"})
@Bean
public ConfigurationCheck configurationCheck() throws Exception {
return new ConfigurationCheck(neo4jTemplate(),neo4jTransactionManager());