Open philwebb opened 4 days ago
This bug exists in earlier versions, but given it's mostly going to be triggered by the new MongoJobRepositoryFactoryBean
I think we should keep the target to 3.4
The sample now appears to start if:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>
and
@Bean
MongoTransactionManager mongoTransactionManager(MongoDatabaseFactory dbf) {
return new MongoTransactionManager(dbf);
}
@mbhave pointed out that BatchAutoConfiguration
depends on DataSource
so it may back off entirely with the pring-boot-starter-jdbc
exclusion. We probably need a more complete fix for Mongo support.
That might need to wait until 3.5, in which case we could revert my "fix" in 3.4
Chatting with @fmbenhassine, this may need to wait for Spring Boot 4.0/Spring Batch 6.0 to allow some breaking changes to be made, such as DefaultBatchConfiguration
losing its DataSource
assumptions.
Sample at https://github.com/joshlong-attic/2024-11-20-batch-job-repository