Skip to content
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

Remove jobrepository dsl sample & doc #142

Merged
merged 1 commit into from
Feb 8, 2025
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
31 changes: 0 additions & 31 deletions doc/en/configuration/kotlin-dsl/job/job-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- [Set a BatchJobObservationConvention](#set-a-batchjobobservationconvention)
- [Set a ObservationRegistry](#set-a-observationregistry)
- [Set preventRestart](#set-preventrestart)
- [Set a Repository](#set-a-repository)
- [Set a JobParametersValidator](#set-a-jobparametersvalidator)

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.
Expand Down Expand Up @@ -246,36 +245,6 @@ open class TestJobConfig(
}
```

## Set a Repository

The Kotlin DSL helps you set a `JobRepository` using `JobBuilder`.

```kotlin
@Configuration
open class TestJobConfig(
private val batch: BatchDsl,
private val transactionManager: PlatformTransactionManager,
) {

@Bean
open fun testJob(jobRepository: JobRepository): Job = batch {
job("testJob") {
repository(
object : JobRepository by jobRepository {
override fun update(jobExecution: JobExecution) {
println("update jobExecution to $jobExecution")
jobRepository.update(jobExecution)
}
},
)
step("testStep") {
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
}
}
}
}
```

## Set a JobParametersValidator

The Kotlin DSL helps you set a `JobParametersValidator` using `JobBuilder`.
Expand Down
32 changes: 0 additions & 32 deletions doc/en/configuration/kotlin-dsl/step/step-configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Step Configuration

- [Set a job repository](#set-a-job-repository)
- [Set a BatchStepObservationConvention](#set-a-batchstepobservationconvention)
- [Set a ObservationRegistry](#set-a-observationregistry)
- [Set a MeterRegistry](#set-a-meterregistry)
Expand All @@ -12,37 +11,6 @@

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.

## Set a job repository

The Kotlin DSL helps you set a `JobRepository` using `StepBuilder`.

```kotlin
@Configuration
open class TestJobConfig(
private val batch: BatchDsl,
private val transactionManager: PlatformTransactionManager,
private val jobRepository: JobRepository,
) {

@Bean
open fun testJob(): Job = batch {
job("testJob") {
step("testStep") {
repository(
object : JobRepository by jobRepository {
override fun update(stepExecution: StepExecution) {
println("update stepExecution to $stepExecution")
jobRepository.update(stepExecution)
}
},
)
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
}
}
}
}
```

## Set a BatchStepObservationConvention

The Kotlin DSL helps you set a `BatchStepObservationConvention` using `StepBuilder`.
Expand Down
31 changes: 0 additions & 31 deletions doc/ko/configuration/kotlin-dsl/job/job-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- [BatchJobObservationConvention 설정하기](#batchjobobservationconvention-설정하기)
- [ObservationRegistry 설정하기](#observationregistry-설정하기)
- [PreventRestart 설정하기](#preventrestart-설정하기)
- [Repository 설정하기](#repository-설정하기)
- [JobParametersValidator 설정하기](#jobparametersvalidator-설정하기)

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

## Repository 설정하기

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

```kotlin
@Configuration
open class TestJobConfig(
private val batch: BatchDsl,
private val transactionManager: PlatformTransactionManager,
) {

@Bean
open fun testJob(jobRepository: JobRepository): Job = batch {
job("testJob") {
repository(
object : JobRepository by jobRepository {
override fun update(jobExecution: JobExecution) {
println("update jobExecution to $jobExecution")
jobRepository.update(jobExecution)
}
},
)
step("testStep") {
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
}
}
}
}
```

## JobParametersValidator 설정하기

Kotlin DSL은 `JobBuilder`를 사용해서 `JobParametersValidator` 설정을 하는 방법을 제공합니다.
Expand Down
32 changes: 0 additions & 32 deletions doc/ko/configuration/kotlin-dsl/step/step-configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Step Configuration

- [Job Repository 설정](#job-repository-설정)
- [BatchStepObservationConvention 설정](#batchstepobservationconvention-설정)
- [ObservationRegistry 설정](#observationregistry-설정)
- [MeterRegistry 설정](#meterregistry-설정)
Expand All @@ -12,37 +11,6 @@

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

## Job Repository 설정

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

```kotlin
@Configuration
open class TestJobConfig(
private val batch: BatchDsl,
private val transactionManager: PlatformTransactionManager,
private val jobRepository: JobRepository,
) {

@Bean
open fun testJob(): Job = batch {
job("testJob") {
step("testStep") {
repository(
object : JobRepository by jobRepository {
override fun update(stepExecution: StepExecution) {
println("update stepExecution to $stepExecution")
jobRepository.update(stepExecution)
}
},
)
tasklet({ _, _ -> RepeatStatus.FINISHED }, transactionManager)
}
}
}
}
```

## BatchStepObservationConvention 설정

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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.