I am using MongoDb and Neo4j in my Spring Boot Application. I have recently updated by Spring Boot Gradle Plugin from 1.2.6 to 1.5.7.
I am having two config files one for mongo and other for neo4j. After updating the version of spring boot I found that @EnableMongoRepositories
and @EnableNeo4jRepositories
are showing following errors in their respective config files:
No constructor with 1 argument defined in class
'org.springframework.data.mongodb.repository.support.MongoRepositoryFactoryBean'No constructor with 1 argument defined in class 'org.springframework.data.neo4j.repository.support.GraphRepositoryFactoryBean'
I am having following annotations in neo4j config:
@Configuration
@EnableNeo4jRepositories("<packagename>.neo4j.repository") @EnableTransactionManagement
public class DatabaseConfigurationNeo4j extends Neo4jConfiguration
{
...
}
and following annotations in mongo config:
@Configuration
@Profile("!" + Constants.SPRING_PROFILE_CLOUD)
@EnableMongoRepositories("<packagename>.repository")
@Import(value = MongoAutoConfiguration.class)
@EnableMongoAuditing(auditorAwareRef = "springSecurityAuditorAware")
public class DatabaseConfiguration extends AbstractMongoConfiguration
{
...
}
If I remove these @EnableRepositories line from the files, these errors are removed but when I run it, the repositories bean are not creating. I think these lines are necessary but dont know how to remove this error.
Thank you.