You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/batch.adoc
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ This section addresses those questions.
9
9
[[howto.batch.specifying-a-data-source]]
10
10
== Specifying a Batch Data Source
11
11
12
-
By default, batch applications require a javadoc:javax.sql.DataSource[] to store job details.
13
-
Spring Batch expects a single javadoc:javax.sql.DataSource[] by default.
14
-
To have it use a javadoc:javax.sql.DataSource[] other than the application’s main javadoc:javax.sql.DataSource[], declare a javadoc:javax.sql.DataSource[] bean, annotating its javadoc:org.springframework.context.annotation.Bean[format=annotation] method with javadoc:org.springframework.boot.batch.jdbc.autoconfigure.BatchDataSource[format=annotation].
12
+
Batch applications that store job details in an SQL database require a javadoc:javax.sql.DataSource[] bean.
13
+
A single javadoc:javax.sql.DataSource[] bean is required by default.
14
+
To have Spring Batch use a javadoc:javax.sql.DataSource[] other than the application’s main javadoc:javax.sql.DataSource[], declare a javadoc:javax.sql.DataSource[] bean, annotating its javadoc:org.springframework.context.annotation.Bean[format=annotation] method with javadoc:org.springframework.boot.batch.jdbc.autoconfigure.BatchDataSource[format=annotation].
15
15
If you do so and want two data sources (for example by retaining the main auto-configured javadoc:javax.sql.DataSource[]), set the `defaultCandidate` attribute of the javadoc:org.springframework.context.annotation.Bean[format=annotation] annotation to `false`.
16
16
17
17
@@ -66,10 +66,3 @@ This allows them to be modified or removed.
66
66
NOTE: When you're using a custom javadoc:org.springframework.batch.core.JobParametersIncrementer[], you have to gather all parameters managed by the incrementer to restart a failed execution.
67
67
68
68
69
-
70
-
[[howto.batch.storing-job-repository]]
71
-
== Storing the Job Repository
72
-
73
-
Spring Batch requires a data store for the javadoc:org.springframework.batch.core.Job[] repository.
74
-
If you use Spring Boot, you must use an actual database.
75
-
Note that it can be an in-memory database, see {url-spring-batch-docs}/job.html#configuringJobRepository[Configuring a Job Repository].
0 commit comments