Add missing class check on Neo4jDataAutoConfiguration

Neo4jDataAutoConfiguration is meant to kick in when Spring Data Neo4J is
on the classpath. Yet, we were only checking for the presence of neo4j
itself and the transaction manager provided by spring-tx.

This commit makes sure to back off if Spring Data Neo4J is not present.

Closes gh-10038
pull/10039/merge
Stephane Nicoll 7 years ago
parent 8b8322216d
commit fa037610f8

@ -53,7 +53,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
* @since 1.4.0
*/
@Configuration
@ConditionalOnClass({ SessionFactory.class, PlatformTransactionManager.class })
@ConditionalOnClass({ SessionFactory.class, Neo4jTransactionManager.class,
PlatformTransactionManager.class })
@ConditionalOnMissingBean(SessionFactory.class)
@EnableConfigurationProperties(Neo4jProperties.class)
@SuppressWarnings("deprecation")

Loading…
Cancel
Save