Skip to content

Commit 4d3e374

Browse files
committed
Merge branch '3.5.x'
Closes gh-48266
2 parents 04ba412 + a30efc8 commit 4d3e374

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

documentation/spring-boot-docs/src/docs/antora/modules/how-to/pages/batch.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ By default, batch applications require a javadoc:javax.sql.DataSource[] to store
1313
Spring Batch expects a single javadoc:javax.sql.DataSource[] by default.
1414
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].
1515
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].
2116

2217

2318

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/io/spring-batch.adoc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
Spring Boot offers several conveniences for working with {url-spring-batch-site}[Spring Batch], including running a Job on startup.
55

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-
86
When building a batch application, the following stores can be auto-configured:
97

108
* In-memory
@@ -21,10 +19,19 @@ spring:
2119
table-prefix: "CUSTOM_"
2220
----
2321

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.
2624
Spring Batch can then be configured using the `@Enable*JobRepository` annotation's attributes rather than the previously described configuration properties.
2725

26+
To learn more about manually configuring Spring Batch, see the API documentation of:
27+
28+
* javadoc:org.springframework.batch.core.configuration.support.DefaultBatchConfiguration[]
29+
* javadoc:org.springframework.batch.core.configuration.annotation.EnableBatchProcessing[format=annotation]
30+
* javadoc:org.springframework.batch.core.configuration.annotation.EnableJdbcJobRepository[format=annotation]
31+
* javadoc:org.springframework.batch.core.configuration.annotation.EnableMongoJobRepository[format=annotation]
32+
33+
For more information about Spring Batch, see the {url-spring-batch-site}[Spring Batch project page].
34+
2835

2936

3037
[[io.spring-batch.running-jobs-on-startup]]
@@ -43,5 +50,4 @@ spring:
4350
enabled: false
4451
----
4552

46-
4753
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

Comments
 (0)