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
This commit is contained in:
Stephane Nicoll 2017-08-18 12:07:59 +02:00
parent 8b8322216d
commit fa037610f8
1 changed files with 2 additions and 1 deletions

View File

@ -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")