Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
java: [11, 17, 21, 22-ea]
java: [17, 21, 22-ea]
distribution: ['temurin']
fail-fast: false
max-parallel: 4
Expand Down
13 changes: 5 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@
</distributionManagement>

<properties>
<java.version>17</java.version>
<java.release.version>8</java.release.version>
<junit.jupiter.version>5.10.1</junit.jupiter.version>
<spring.batch.version>4.3.9</spring.batch.version>
<spring.batch.version>5.0.3</spring.batch.version>

<checkstyle.config>checkstyle-override.xml</checkstyle.config>

Expand Down Expand Up @@ -89,7 +91,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.3.31</version>
<version>6.0.14</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
Expand Down Expand Up @@ -128,7 +130,7 @@
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>2.1.1</version>
<version>3.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -225,11 +227,6 @@
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<configuration>
<args>
<arg>-Xuse-ir</arg>
</args>
</configuration>
<executions>
<execution>
<id>compile</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ public MyBatisBatchItemWriter<PersonRecord> writer(SqlSessionFactory sqlSessionF

@Bean
public Step step1(ItemProcessor<PersonRecord, PersonRecord> processor, ItemWriter<PersonRecord> writer) {
return new StepBuilder("step1")
.repository(jobRepository) // In Spring Batch 5, move this to the step builder constructor
.transactionManager(transactionManager) // In Spring Batch 5, move this to the 'chunk' method
.<PersonRecord, PersonRecord>chunk(10)
return new StepBuilder("step1", jobRepository)
.<PersonRecord, PersonRecord>chunk(10, transactionManager)
.reader(new TestRecordGenerator())
.processor(processor)
.writer(writer)
Expand All @@ -115,8 +113,7 @@ public Step step1(ItemProcessor<PersonRecord, PersonRecord> processor, ItemWrite

@Bean
public Job insertRecords(Step step1) {
return new JobBuilder("insertRecords")
.repository(jobRepository) // In Spring Batch 5, move this to the job builder constructor
return new JobBuilder("insertRecords", jobRepository)
.incrementer(new RunIdIncrementer())
.flow(step1)
.end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ public MyBatisBatchItemWriter<PersonRecord> writer(SqlSessionFactory sqlSessionF

@Bean
public Step step1(ItemReader<PersonRecord> reader, ItemProcessor<PersonRecord, PersonRecord> processor, ItemWriter<PersonRecord> writer) {
return new StepBuilder("step1")
.repository(jobRepository) // In Spring Batch 5, move this to the step builder constructor
.transactionManager(transactionManager) // In Spring Batch 5, move this to the 'chunk' method
.<PersonRecord, PersonRecord>chunk(10)
return new StepBuilder("step1", jobRepository)
.<PersonRecord, PersonRecord>chunk(10, transactionManager)
.reader(reader)
.processor(processor)
.writer(writer)
Expand All @@ -126,8 +124,7 @@ public Step step1(ItemReader<PersonRecord> reader, ItemProcessor<PersonRecord, P

@Bean
public Job upperCaseLastName(Step step1) {
return new JobBuilder("upperCaseLastName") // In Spring Batch 5, move this to the job builder constructor
.repository(jobRepository)
return new JobBuilder("upperCaseLastName", jobRepository) // In Spring Batch 5, move this to the job builder constructor
.incrementer(new RunIdIncrementer())
.flow(step1)
.end()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,8 @@ public MyBatisBatchItemWriter<PersonRecord> writer(SqlSessionFactory sqlSessionF

@Bean
public Step step1(ItemReader<PersonRecord> reader, ItemProcessor<PersonRecord, PersonRecord> processor, ItemWriter<PersonRecord> writer) {
return new StepBuilder("step1")
.repository(jobRepository) // In Spring Batch 5, move this to the step builder constructor
.transactionManager(transactionManager) // In Spring Batch 5, move this to the 'chunk' method
.<PersonRecord, PersonRecord>chunk(7)
return new StepBuilder("step1", jobRepository)
.<PersonRecord, PersonRecord>chunk(7, transactionManager)
.reader(reader)
.processor(processor)
.writer(writer)
Expand All @@ -127,8 +125,7 @@ public Step step1(ItemReader<PersonRecord> reader, ItemProcessor<PersonRecord, P

@Bean
public Job upperCaseLastName(Step step1) {
return new JobBuilder("upperCaseLastName")
.repository(jobRepository) // In Spring Batch 5, move this to the job builder constructor
return new JobBuilder("upperCaseLastName", jobRepository)
.incrementer(new RunIdIncrementer())
.flow(step1)
.end()
Expand Down