Skip to content

Commit f366103

Browse files
committed
Create spring-boot-batch module
1 parent 6c95c15 commit f366103

32 files changed

+130
-90
lines changed

settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ include "spring-boot-project:spring-boot-amqp"
4747
include "spring-boot-project:spring-boot-artemis"
4848
include "spring-boot-project:spring-boot-autoconfigure"
4949
include "spring-boot-project:spring-boot-autoconfigure-all"
50+
include "spring-boot-project:spring-boot-batch"
5051
include "spring-boot-project:spring-boot-data-jpa"
5152
include "spring-boot-project:spring-boot-dependencies"
5253
include "spring-boot-project:spring-boot-devtools"

spring-boot-project/spring-boot-autoconfigure-all/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ dependencies {
168168
optional("org.springframework:spring-websocket")
169169
optional("org.springframework:spring-webflux")
170170
optional("org.springframework:spring-webmvc")
171-
optional("org.springframework.batch:spring-batch-core")
172171
optional("org.springframework.data:spring-data-couchbase")
173172
optional("org.springframework.data:spring-data-envers") {
174173
exclude group: "javax.activation", module: "javax.activation-api"

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json

-39
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,6 @@
1313
"description": "Whether subclass-based (CGLIB) proxies are to be created (true), as opposed to standard Java interface-based proxies (false).",
1414
"defaultValue": true
1515
},
16-
{
17-
"name": "spring.batch.initialize-schema",
18-
"type": "org.springframework.boot.sql.init.DatabaseInitializationMode",
19-
"deprecation": {
20-
"replacement": "spring.batch.jdbc.initialize-schema",
21-
"level": "error"
22-
}
23-
},
24-
{
25-
"name": "spring.batch.initializer.enabled",
26-
"type": "java.lang.Boolean",
27-
"description": "Create the required batch tables on startup if necessary. Enabled automatically\n if no custom table prefix is set or if a custom schema is configured.",
28-
"deprecation": {
29-
"replacement": "spring.batch.jdbc.initialize-schema",
30-
"level": "error"
31-
}
32-
},
33-
{
34-
"name": "spring.batch.job.enabled",
35-
"type": "java.lang.Boolean",
36-
"description": "Execute all Spring Batch jobs in the context on startup.",
37-
"defaultValue": true
38-
},
39-
{
40-
"name": "spring.batch.schema",
41-
"type": "java.lang.String",
42-
"deprecation": {
43-
"replacement": "spring.batch.jdbc.schema",
44-
"level": "error"
45-
}
46-
},
47-
{
48-
"name": "spring.batch.table-prefix",
49-
"type": "java.lang.String",
50-
"deprecation": {
51-
"replacement": "spring.batch.jdbc.table-prefix",
52-
"level": "error"
53-
}
54-
},
5516
{
5617
"name": "spring.cassandra.compression",
5718
"defaultValue": "none"

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories

-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvid
1616

1717
# Depends on Database Initialization Detectors
1818
org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\
19-
org.springframework.boot.autoconfigure.batch.JobRepositoryDependsOnDatabaseInitializationDetector,\
2019
org.springframework.boot.autoconfigure.quartz.SchedulerDependsOnDatabaseInitializationDetector,\
2120
org.springframework.boot.autoconfigure.session.JdbcIndexedSessionRepositoryDependsOnDatabaseInitializationDetector

spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
org.springframework.boot.autoconfigure.aop.AopAutoConfiguration
2-
org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration
32
org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
43
org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration
54
org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
plugins {
2+
id "java-library"
3+
id "org.springframework.boot.auto-configuration"
4+
id "org.springframework.boot.configuration-properties"
5+
id "org.springframework.boot.deployed"
6+
id "org.springframework.boot.optional-dependencies"
7+
}
8+
9+
description = "Spring Boot Batch"
10+
11+
dependencies {
12+
api(project(":spring-boot-project:spring-boot"))
13+
api(project(":spring-boot-project:spring-boot-jdbc"))
14+
api("org.springframework.batch:spring-batch-core")
15+
16+
implementation(project(":spring-boot-project:spring-boot-tx"))
17+
18+
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
19+
20+
testImplementation(project(":spring-boot-project:spring-boot-flyway"))
21+
testImplementation(project(":spring-boot-project:spring-boot-jpa"))
22+
testImplementation(project(":spring-boot-project:spring-boot-liquibase"))
23+
testImplementation(project(":spring-boot-project:spring-boot-test"))
24+
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
25+
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure")))
26+
27+
testRuntimeOnly("ch.qos.logback:logback-classic")
28+
testRuntimeOnly("com.fasterxml.jackson.core:jackson-databind")
29+
testRuntimeOnly("com.h2database:h2")
30+
testRuntimeOnly("com.zaxxer:HikariCP")
31+
}
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.util.List;
2020

@@ -67,7 +67,7 @@
6767
* @author Lars Uffmann
6868
* @author Lasse Wulff
6969
* @author Yanming Zhou
70-
* @since 1.0.0
70+
* @since 4.0.0
7171
*/
7272
@AutoConfiguration(after = TransactionAutoConfiguration.class,
7373
afterName = "org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration")
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import org.springframework.batch.core.configuration.support.DefaultBatchConfiguration;
2020
import org.springframework.core.convert.support.ConfigurableConversionService;
@@ -26,7 +26,7 @@
2626
* DefaultBatchConfiguration} while retaining its default auto-configuration.
2727
*
2828
* @author Claudio Nave
29-
* @since 3.1.0
29+
* @since 4.0.0
3030
*/
3131
@FunctionalInterface
3232
public interface BatchConversionServiceCustomizer {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.lang.annotation.Documented;
2020
import java.lang.annotation.ElementType;
@@ -31,7 +31,7 @@
3131
* {@link Primary @Primary}.
3232
*
3333
* @author Dmytro Nosan
34-
* @since 2.2.0
34+
* @since 4.0.0
3535
*/
3636
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
3737
@Retention(RetentionPolicy.RUNTIME)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.util.List;
2020

@@ -33,7 +33,7 @@
3333
* @author Vedran Pavic
3434
* @author Andy Wilkinson
3535
* @author Phillip Webb
36-
* @since 2.6.0
36+
* @since 4.0.0
3737
*/
3838
public class BatchDataSourceScriptDatabaseInitializer extends DataSourceScriptDatabaseInitializer {
3939

Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import org.springframework.boot.context.properties.ConfigurationProperties;
2020
import org.springframework.boot.sql.init.DatabaseInitializationMode;
@@ -28,7 +28,7 @@
2828
* @author Vedran Pavic
2929
* @author Mukul Kumar Chaundhyan
3030
* @author Yanming Zhou
31-
* @since 1.2.0
31+
* @since 4.0.0
3232
*/
3333
@ConfigurationProperties("spring.batch")
3434
public class BatchProperties {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.lang.annotation.Documented;
2020
import java.lang.annotation.ElementType;
@@ -32,7 +32,7 @@
3232
* another one marked as {@link Primary @Primary}.
3333
*
3434
* @author Andy Wilkinson
35-
* @since 3.4.0
35+
* @since 4.0.0
3636
*/
3737
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
3838
@Retention(RetentionPolicy.RUNTIME)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.lang.annotation.Documented;
2020
import java.lang.annotation.ElementType;
@@ -32,7 +32,7 @@
3232
* there is another one marked as {@link Primary @Primary}.
3333
*
3434
* @author Lasse Wulff
35-
* @since 3.3.0
35+
* @since 4.0.0
3636
*/
3737
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE })
3838
@Retention(RetentionPolicy.RUNTIME)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import org.springframework.batch.core.JobExecution;
2020
import org.springframework.context.ApplicationEvent;
@@ -23,7 +23,7 @@
2323
* Spring {@link ApplicationEvent} encapsulating a {@link JobExecution}.
2424
*
2525
* @author Dave Syer
26-
* @since 1.0.0
26+
* @since 4.0.0
2727
*/
2828
@SuppressWarnings("serial")
2929
public class JobExecutionEvent extends ApplicationEvent {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.util.List;
2020
import java.util.concurrent.CopyOnWriteArrayList;
@@ -27,7 +27,7 @@
2727
* {@link ExitCodeGenerator} for {@link JobExecutionEvent}s.
2828
*
2929
* @author Dave Syer
30-
* @since 1.0.0
30+
* @since 4.0.0
3131
*/
3232
public class JobExecutionExitCodeGenerator implements ApplicationListener<JobExecutionEvent>, ExitCodeGenerator {
3333

Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.util.Arrays;
2020
import java.util.Collection;
@@ -64,7 +64,7 @@
6464
* @author Mahmoud Ben Hassine
6565
* @author Stephane Nicoll
6666
* @author Akshay Dubey
67-
* @since 2.3.0
67+
* @since 4.0.0
6868
*/
6969
public class JobLauncherApplicationRunner
7070
implements ApplicationRunner, InitializingBean, Ordered, ApplicationEventPublisherAware {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.autoconfigure.batch;
17+
package org.springframework.boot.batch.autoconfigure;
1818

1919
import java.util.Collections;
2020
import java.util.Set;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,4 +17,4 @@
1717
/**
1818
* Auto-configuration for Spring Batch.
1919
*/
20-
package org.springframework.boot.autoconfigure.batch;
20+
package org.springframework.boot.batch.autoconfigure;

0 commit comments

Comments
 (0)