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
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,6 @@ By default, batch applications require a javadoc:javax.sql.DataSource[] to store
13
13
Spring Batch expects a single javadoc:javax.sql.DataSource[] by default.
14
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].
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
-
To take greater control, add javadoc:org.springframework.batch.core.configuration.annotation.EnableBatchProcessing[format=annotation] to one of your javadoc:org.springframework.context.annotation.Configuration[format=annotation] classes or extend javadoc:org.springframework.batch.core.configuration.support.DefaultBatchConfiguration[].
17
-
See the API documentation of javadoc:org.springframework.batch.core.configuration.annotation.EnableBatchProcessing[format=annotation]
18
-
and javadoc:org.springframework.batch.core.configuration.support.DefaultBatchConfiguration[] for more details.
19
-
20
-
For more info about Spring Batch, see the {url-spring-batch-site}[Spring Batch project page].
Copy file name to clipboardExpand all lines: documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/io/spring-batch.adoc
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,6 @@
3
3
4
4
Spring Boot offers several conveniences for working with {url-spring-batch-site}[Spring Batch], including running a Job on startup.
5
5
6
-
If Spring Batch is available on your classpath, it is initialized through the javadoc:org.springframework.batch.core.configuration.annotation.EnableBatchProcessing[format=annotation] annotation.
7
-
8
6
When building a batch application, the following stores can be auto-configured:
9
7
10
8
* In-memory
@@ -21,10 +19,19 @@ spring:
21
19
table-prefix: "CUSTOM_"
22
20
----
23
21
24
-
You can take control over Spring Batch's configuration using javadoc:org.springframework.batch.core.configuration.annotation.EnableBatchProcessing[format=annotation].
25
-
This will cause the auto-configuration to back off.
22
+
To disable Spring Boot's auto-configuration and take complete control of Spring Batch's configuration, add javadoc:org.springframework.batch.core.configuration.annotation.EnableBatchProcessing[format=annotation] to one of your javadoc:org.springframework.context.annotation.Configuration[format=annotation] classes or extend javadoc:org.springframework.batch.core.configuration.support.DefaultBatchConfiguration[].
23
+
This will cause the auto-configuration to back off, including initialization of Spring Batch's database schema if you're using the JDBC-based store.
26
24
Spring Batch can then be configured using the `@Enable*JobRepository` annotation's attributes rather than the previously described configuration properties.
27
25
26
+
To learn more about manually configuring Spring Batch, see the API documentation of:
For more information about Spring Batch, see the {url-spring-batch-site}[Spring Batch project page].
34
+
28
35
29
36
30
37
[[io.spring-batch.running-jobs-on-startup]]
@@ -43,5 +50,4 @@ spring:
43
50
enabled: false
44
51
----
45
52
46
-
47
53
See {code-spring-boot-batch-src}/autoconfigure/BatchAutoConfiguration.java[`BatchAutoConfiguration`] and {code-spring-boot-batch-jdbc-src}/autoconfigure/BatchJdbcAutoConfiguration.java[`BatchJdbcAutoConfiguration`] for more details.
0 commit comments