-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use other version than 0.1.0. I failed to integrate this in my current project #153
Comments
Hi @kev205, which module are you trying to integrate? |
Hello @scordio thanks, |
that is my pom.xml:
The resolver cannot find other version than the 0.1.0 |
That's correct, version 0.1.0 is the latest version published. Are you facing any issues with this version? |
Yes @Configuration
@EnableReactiveNeo4jRepositories(basePackages = "com.orion.xchange.goods.repositories")
@EnableReactiveNeo4jAuditing
public class Neo4jConfig {
@Bean(ReactiveNeo4jRepositoryConfigurationExtension.DEFAULT_TRANSACTION_MANAGER_BEAN_NAME)
public ReactiveTransactionManager reactiveTransactionManager(Driver driver,
ReactiveDatabaseSelectionProvider databaseNameProvider) {
return new ReactiveNeo4jTransactionManager(driver, databaseNameProvider);
}
@Bean
org.neo4j.cypherdsl.core.renderer.Configuration cypherDslConfiguration() {
return org.neo4j.cypherdsl.core.renderer.Configuration.newConfig()
.withDialect(Dialect.NEO4J_5).build();
}
@Bean
ReactiveAuditorAware<String> reactiveAuditorAware() {
return () -> ReactiveSecurityContextHolder.getContext()
.map(SecurityContext::getAuthentication)
.filter(Authentication::isAuthenticated)
.map(Authentication::getName);
}
@Bean
public Neo4jConversions neo4jConversions() {
Set<GenericConverter> additionalConverters = Set.of(new ImageDTOToValueConverter(),
new Neo4jRatesToUserRateConverter());
return new Neo4jConversions(additionalConverters);
}
} Now the current version ask me for a sessionFactory but i don't know how to get it. i have tried anything without success |
And this is the configuration of spring batch: @Configuration
@EnableBatchProcessing(tablePrefix = "BATCH_", maxVarCharLength = 1000, isolationLevelForCreate = "SERIALIZABLE")
public class BacthConfig {
@Value("${spring.neo4j.uri}")
private String uri;
@Value("${spring.neo4j.authentication.username}")
private String username;
@Value("${spring.neo4j.authentication.password}")
private String password;
@Bean
public SessionFactory sessionFactory() {
String[] packagesToScan = { "com.orion.xchange.goods.entities" };
org.neo4j.ogm.config.Configuration configuration = new org.neo4j.ogm.config.Configuration.Builder()
.uri(uri)
.credentials(username, password)
.build();
return new SessionFactory(configuration, packagesToScan);
}
@Bean
public ItemReader<ArticleBasics> articleItemReader() {
return new Neo4jItemReaderBuilder<ArticleBasics>()
.name("articleReader")
.sessionFactory(sessionFactory())
.pageSize(50)
.matchStatement("(a:Article)")
.whereStatement("a.status <> 'OUT_OF_STOCK'")
.orderByStatement("a.createdAt DESC")
.returnStatement("a")
.targetType(ArticleBasics.class)
.pageSize(50)
.build();
}
@Bean
public ItemWriter<Article> articleItemWriter() {
return new Neo4jItemWriterBuilder<Article>().sessionFactory(sessionFactory())
.build();
}
} Am I doing something wrong? I need some help. |
Hi @michael-simons, would you have any hints? |
Hello. Warning: I never used Spring Batch in any capacity, so the quality of my answer might not be good. As far as I know Spring Batch Neo4j used to be build on SDN5 + Neo4j-OGM, at a time at which SDN was only a thin wrapper around Neo4j-OGM the original Neo4j Object mapper. Looking at the version linked above (0.1.0) this is the case in that version. The configuration @kev205 shared indicates that they are on a recent Spring Boot / Spring Data Neo4j version, which is excellent! SDN6 and higher is an object mapper on its own right, does not use or support Neo4j-OGM. by my colleague @meistermeier has been released. Hope that helps a bit. |
Hello @michael-simons how to get that change? |
1 similar comment
Hello @michael-simons how to get that change? |
I have no rights or means to release on that repository, sorry. |
So any advise for me? Or i just have to skip the batch feature on my project? |
I think we can organize a release with the help of @fmbenhassine. I can prepare a milestone and collect the unreleased issues and PRs, so that we can publish a meaningful changelog. Given the newer combination of dependencies, should we release it as 1.0.0 to signal the major change? |
Closing in favor of #157. |
No description provided.
The text was updated successfully, but these errors were encountered: