Skip to content

Commit 5524fda

Browse files
committed
Convert to Asciidoctor Tabs
1 parent fd95912 commit 5524fda

37 files changed

+3085
-2684
lines changed

spring-batch-docs/modules/ROOT/pages/common-patterns.adoc

Lines changed: 232 additions & 163 deletions
Large diffs are not rendered by default.

spring-batch-docs/modules/ROOT/pages/domain.adoc

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
[[domainLanguageOfBatch]]
33
= The Domain Language of Batch
44

5-
ifndef::onlyonetoggle[]
6-
endif::onlyonetoggle[]
75

86
To any experienced batch architect, the overall concepts of batch processing used in
97
Spring Batch should be familiar and comfortable. There are "`Jobs`" and "`Steps`" and
@@ -57,15 +55,18 @@ global to all steps, such as restartability. The job configuration contains:
5755
* Definition and ordering of `Step` instances.
5856
* Whether or not the job is restartable.
5957

60-
ifdef::backend-spring-html[]
61-
[role="javaContent"]
58+
59+
[tabs]
60+
====
61+
Java::
62+
+
6263
For those who use Java configuration, Spring Batch provides a default implementation of
6364
the `Job` interface in the form of the `SimpleJob` class, which creates some standard
6465
functionality on top of `Job`. When using Java-based configuration, a collection of
6566
builders is made available for the instantiation of a `Job`, as the following
6667
example shows:
67-
68-
[source, java, role="javaContent"]
68+
+
69+
[source, java]
6970
----
7071
@Bean
7172
public Job footballJob(JobRepository jobRepository) {
@@ -77,54 +78,28 @@ public Job footballJob(JobRepository jobRepository) {
7778
}
7879
----
7980
80-
[role="xmlContent"]
81+
XML::
82+
+
8183
For those who use XML configuration, Spring Batch provides a default implementation of the
8284
`Job` interface in the form of the `SimpleJob` class, which creates some standard
8385
functionality on top of `Job`. However, the batch namespace abstracts away the need to
8486
instantiate it directly. Instead, you can use the `<job>` element, as the
8587
following example shows:
86-
87-
[source, xml, role="xmlContent"]
88+
+
89+
[source, xml]
8890
----
8991
<job id="footballJob">
9092
<step id="playerload" next="gameLoad"/>
9193
<step id="gameLoad" next="playerSummarization"/>
9294
<step id="playerSummarization"/>
9395
</job>
9496
----
95-
endif::backend-spring-html[]
9697
97-
ifdef::backend-pdf[]
98-
Spring Batch provides a default implementation of the `Job` interface in the form of the
99-
`SimpleJob` class, which creates some standard functionality on top of `Job`. When using
100-
Java-based configuration, a collection of builders are made available for the
101-
instantiation of a `Job`, as the following example shows:
98+
====
99+
102100

103-
[source, java]
104-
----
105-
@Bean
106-
public Job footballJob(JobRepository jobRepository) {
107-
return new JobBuilder("footballJob", jobRepository)
108-
.start(playerLoad())
109-
.next(gameLoad())
110-
.next(playerSummarization())
111-
.build();
112-
}
113-
----
114101

115-
However, when using XML configuration, the batch namespace abstracts away the need to
116-
instantiate it directly. Instead, you can use the `<job>` element, as the following
117-
example shows:
118102

119-
[source, xml]
120-
----
121-
<job id="footballJob">
122-
<step id="playerload" next="gameLoad"/>
123-
<step id="gameLoad" next="playerSummarization"/>
124-
<step id="playerSummarization"/>
125-
</job>
126-
----
127-
endif::backend-pdf[]
128103

129104
[[jobinstance]]
130105
=== JobInstance
@@ -568,18 +543,25 @@ It provides CRUD operations for `JobLauncher`, `Job`, and `Step` implementations
568543
the course of execution, `StepExecution` and `JobExecution` implementations are persisted
569544
by passing them to the repository.
570545

571-
[role="xmlContent"]
546+
547+
[tabs]
548+
====
549+
Java::
550+
+
551+
When using Java configuration, the `@EnableBatchProcessing` annotation provides a
552+
`JobRepository` as one of the components that is automatically configured.
553+
554+
XML::
555+
+
572556
The Spring Batch XML namespace provides support for configuring a `JobRepository` instance
573557
with the `<job-repository>` tag, as the following example shows:
574-
575-
[source, xml, role="xmlContent"]
558+
+
559+
[source, xml]
576560
----
577561
<job-repository id="jobRepository"/>
578562
----
563+
====
579564

580-
[role="javaContent"]
581-
When using Java configuration, the `@EnableBatchProcessing` annotation provides a
582-
`JobRepository` as one of the components that is automatically configured.
583565

584566
[[joblauncher]]
585567
== JobLauncher
@@ -638,6 +620,7 @@ Many of the domain concepts listed previously need to be configured in a Spring
638620
use in a standard bean definition, a namespace has been provided for ease of
639621
configuration, as the following example shows:
640622

623+
641624
[source, xml, role="xmlContent"]
642625
----
643626
<beans:beans xmlns="http://www.springframework.org/schema/batch"
@@ -660,8 +643,8 @@ xsi:schemaLocation="
660643
</beans:beans>
661644
----
662645

663-
[role="xmlContent"]
664646
As long as the batch namespace has been declared, any of its elements can be used. You can find more
665647
information on configuring a Job in xref:job.adoc[Configuring and Running a Job]
666648
. You can find more information on configuring a `Step` in
667649
xref:step.adoc[Configuring a Step].
650+

0 commit comments

Comments
 (0)