Skip to content

Commit 8b22a72

Browse files
authored
Remove jobrepository dsl sample & doc
Signed-off-by: Taeik Lim <[email protected]>
1 parent 4094aec commit 8b22a72

File tree

8 files changed

+0
-321
lines changed

8 files changed

+0
-321
lines changed

doc/en/configuration/kotlin-dsl/job/job-configuration.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- [Set a BatchJobObservationConvention](#set-a-batchjobobservationconvention)
99
- [Set a ObservationRegistry](#set-a-observationregistry)
1010
- [Set preventRestart](#set-preventrestart)
11-
- [Set a Repository](#set-a-repository)
1211
- [Set a JobParametersValidator](#set-a-jobparametersvalidator)
1312

1413
The functions that can be set with `JobBuilder` are also available with the Kotlin DSL. In this page, you will learn how to set a `Job` using the Kotlin DSL.
@@ -246,36 +245,6 @@ open class TestJobConfig(
246245
}
247246
```
248247

249-
## Set a Repository
250-
251-
The Kotlin DSL helps you set a `JobRepository` using `JobBuilder`.
252-
253-
```kotlin
254-
@Configuration
255-
open class TestJobConfig(
256-
private val batch: BatchDsl,
257-
private val transactionManager: PlatformTransactionManager,
258-
) {
259-
260-
@Bean
261-
open fun testJob(jobRepository: JobRepository): Job = batch {
262-
job("testJob") {
263-
repository(
264-
object : JobRepository by jobRepository {
265-
override fun update(jobExecution: JobExecution) {
266-
println("update jobExecution to $jobExecution")
267-
jobRepository.update(jobExecution)
268-
}
269-
},
270-
)
271-
step("testStep") {
272-
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
273-
}
274-
}
275-
}
276-
}
277-
```
278-
279248
## Set a JobParametersValidator
280249

281250
The Kotlin DSL helps you set a `JobParametersValidator` using `JobBuilder`.

doc/en/configuration/kotlin-dsl/step/step-configuration.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Step Configuration
22

3-
- [Set a job repository](#set-a-job-repository)
43
- [Set a BatchStepObservationConvention](#set-a-batchstepobservationconvention)
54
- [Set a ObservationRegistry](#set-a-observationregistry)
65
- [Set a MeterRegistry](#set-a-meterregistry)
@@ -12,37 +11,6 @@
1211

1312
The functions that can be set with `StepBuilder` are also available with the Kotlin DSL. In this page, you will learn how to configure a `Step` using the Kotlin DSL.
1413

15-
## Set a job repository
16-
17-
The Kotlin DSL helps you set a `JobRepository` using `StepBuilder`.
18-
19-
```kotlin
20-
@Configuration
21-
open class TestJobConfig(
22-
private val batch: BatchDsl,
23-
private val transactionManager: PlatformTransactionManager,
24-
private val jobRepository: JobRepository,
25-
) {
26-
27-
@Bean
28-
open fun testJob(): Job = batch {
29-
job("testJob") {
30-
step("testStep") {
31-
repository(
32-
object : JobRepository by jobRepository {
33-
override fun update(stepExecution: StepExecution) {
34-
println("update stepExecution to $stepExecution")
35-
jobRepository.update(stepExecution)
36-
}
37-
},
38-
)
39-
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
40-
}
41-
}
42-
}
43-
}
44-
```
45-
4614
## Set a BatchStepObservationConvention
4715

4816
The Kotlin DSL helps you set a `BatchStepObservationConvention` using `StepBuilder`.

doc/ko/configuration/kotlin-dsl/job/job-configuration.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- [BatchJobObservationConvention 설정하기](#batchjobobservationconvention-설정하기)
99
- [ObservationRegistry 설정하기](#observationregistry-설정하기)
1010
- [PreventRestart 설정하기](#preventrestart-설정하기)
11-
- [Repository 설정하기](#repository-설정하기)
1211
- [JobParametersValidator 설정하기](#jobparametersvalidator-설정하기)
1312

1413
Kotlin DSL은 `JobBuilder`에서 설정할 수 있는 기능을 모두 제공합니다. 이 문서에서는 Kotlin DSL을 활용해서 `Job` 을 설정하는 방법에 대해서 다룹니다.
@@ -247,36 +246,6 @@ open class TestJobConfig(
247246
}
248247
```
249248

250-
## Repository 설정하기
251-
252-
Kotlin DSL은 `JobBuilder`를 사용해서 `JobRepository` 설정을 하는 방법을 제공합니다.
253-
254-
```kotlin
255-
@Configuration
256-
open class TestJobConfig(
257-
private val batch: BatchDsl,
258-
private val transactionManager: PlatformTransactionManager,
259-
) {
260-
261-
@Bean
262-
open fun testJob(jobRepository: JobRepository): Job = batch {
263-
job("testJob") {
264-
repository(
265-
object : JobRepository by jobRepository {
266-
override fun update(jobExecution: JobExecution) {
267-
println("update jobExecution to $jobExecution")
268-
jobRepository.update(jobExecution)
269-
}
270-
},
271-
)
272-
step("testStep") {
273-
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
274-
}
275-
}
276-
}
277-
}
278-
```
279-
280249
## JobParametersValidator 설정하기
281250

282251
Kotlin DSL은 `JobBuilder`를 사용해서 `JobParametersValidator` 설정을 하는 방법을 제공합니다.

doc/ko/configuration/kotlin-dsl/step/step-configuration.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Step Configuration
22

3-
- [Job Repository 설정](#job-repository-설정)
43
- [BatchStepObservationConvention 설정](#batchstepobservationconvention-설정)
54
- [ObservationRegistry 설정](#observationregistry-설정)
65
- [MeterRegistry 설정](#meterregistry-설정)
@@ -12,37 +11,6 @@
1211

1312
Kotlin DSL에서는 `StepBuilder`에서 설정할 수 있는 기능을 모두 제공합니다. 이 문서에서는 Kotlin DSL을 활용해서 `Step` 관련 설정들을 하는 방법에 대해서 다룹니다.
1413

15-
## Job Repository 설정
16-
17-
Kotlin DSL은 `StepBuilder`를 사용하여 `JobRepository`를 설정하는 방법을 제공합니다.
18-
19-
```kotlin
20-
@Configuration
21-
open class TestJobConfig(
22-
private val batch: BatchDsl,
23-
private val transactionManager: PlatformTransactionManager,
24-
private val jobRepository: JobRepository,
25-
) {
26-
27-
@Bean
28-
open fun testJob(): Job = batch {
29-
job("testJob") {
30-
step("testStep") {
31-
repository(
32-
object : JobRepository by jobRepository {
33-
override fun update(stepExecution: StepExecution) {
34-
println("update stepExecution to $stepExecution")
35-
jobRepository.update(stepExecution)
36-
}
37-
},
38-
)
39-
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
40-
}
41-
}
42-
}
43-
}
44-
```
45-
4614
## BatchStepObservationConvention 설정
4715

4816
Kotlin DSL은 `StepBuilder`를 사용하여 `BatchStepObservationConvention`을 설정하는 방법을 제공합니다.

spring-batch-plus-sample/kotlin-dsl-sample/src/test/kotlin/com/navercorp/spring/batch/plus/sample/job/configuration/repository/SampleApplicationTest.kt

Lines changed: 0 additions & 45 deletions
This file was deleted.

spring-batch-plus-sample/kotlin-dsl-sample/src/test/kotlin/com/navercorp/spring/batch/plus/sample/job/configuration/repository/TestJobConfig.kt

Lines changed: 0 additions & 52 deletions
This file was deleted.

spring-batch-plus-sample/kotlin-dsl-sample/src/test/kotlin/com/navercorp/spring/batch/plus/sample/step/configuration/repository/SampleApplicationTest.kt

Lines changed: 0 additions & 45 deletions
This file was deleted.

spring-batch-plus-sample/kotlin-dsl-sample/src/test/kotlin/com/navercorp/spring/batch/plus/sample/step/configuration/repository/TestJobConfig.kt

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)