From 06173670b34fb8a84b756acfd617e8fef714c216 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 21 Mar 2025 16:54:02 +0000 Subject: [PATCH] Create spring-boot-batch module --- settings.gradle | 1 + .../build.gradle | 1 - ...itional-spring-configuration-metadata.json | 39 ----------------- .../main/resources/META-INF/spring.factories | 1 - ...ot.autoconfigure.AutoConfiguration.imports | 1 - .../spring-boot-batch/build.gradle | 31 +++++++++++++ .../BatchAutoConfiguration.java | 4 +- .../BatchConversionServiceCustomizer.java | 6 +-- .../batch/autoconfigure}/BatchDataSource.java | 6 +-- ...chDataSourceScriptDatabaseInitializer.java | 6 +-- .../batch/autoconfigure}/BatchProperties.java | 4 +- .../autoconfigure}/BatchTaskExecutor.java | 6 +-- .../BatchTransactionManager.java | 6 +-- .../autoconfigure}/JobExecutionEvent.java | 6 +-- .../JobExecutionExitCodeGenerator.java | 6 +-- .../JobLauncherApplicationRunner.java | 4 +- ...pendsOnDatabaseInitializationDetector.java | 4 +- .../batch/autoconfigure}/package-info.java | 4 +- ...itional-spring-configuration-metadata.json | 43 +++++++++++++++++++ .../main/resources/META-INF/spring.factories | 3 ++ ...ot.autoconfigure.AutoConfiguration.imports | 1 + .../BatchAutoConfigurationTests.java | 12 +++--- ...BatchAutoConfigurationWithoutJpaTests.java | 6 +-- ...aSourceScriptDatabaseInitializerTests.java | 2 +- .../autoconfigure}/BatchPropertiesTests.java | 2 +- .../JobExecutionExitCodeGeneratorTests.java | 4 +- .../JobLauncherApplicationRunnerTests.java | 4 +- .../batch/autoconfigure}/domain/City.java | 2 +- .../batch/autoconfigure}/custom-schema.sql | 0 .../spring-boot-dependencies/build.gradle | 1 + .../spring-boot-docs/build.gradle | 2 + .../spring-boot-starter-batch/build.gradle | 2 +- 32 files changed, 130 insertions(+), 90 deletions(-) create mode 100644 spring-boot-project/spring-boot-batch/build.gradle rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/BatchAutoConfiguration.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/BatchConversionServiceCustomizer.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/BatchDataSource.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/BatchDataSourceScriptDatabaseInitializer.java (96%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/BatchProperties.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/BatchTaskExecutor.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/BatchTransactionManager.java (92%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/JobExecutionEvent.java (90%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/JobExecutionExitCodeGenerator.java (91%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/JobLauncherApplicationRunner.java (99%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/JobRepositoryDependsOnDatabaseInitializationDetector.java (92%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure}/package-info.java (84%) create mode 100644 spring-boot-project/spring-boot-batch/src/main/resources/META-INF/additional-spring-configuration-metadata.json create mode 100644 spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring.factories create mode 100644 spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure}/BatchAutoConfigurationTests.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure}/BatchAutoConfigurationWithoutJpaTests.java (96%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure}/BatchDataSourceScriptDatabaseInitializerTests.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure}/BatchPropertiesTests.java (96%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure}/JobExecutionExitCodeGeneratorTests.java (93%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure}/JobLauncherApplicationRunnerTests.java (98%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure}/domain/City.java (96%) rename spring-boot-project/{spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/batch => spring-boot-batch/src/test/resources/org/springframework/boot/batch/autoconfigure}/custom-schema.sql (100%) diff --git a/settings.gradle b/settings.gradle index 5d4722ea25..a31481df15 100644 --- a/settings.gradle +++ b/settings.gradle @@ -47,6 +47,7 @@ include "spring-boot-project:spring-boot-amqp" include "spring-boot-project:spring-boot-artemis" include "spring-boot-project:spring-boot-autoconfigure" include "spring-boot-project:spring-boot-autoconfigure-all" +include "spring-boot-project:spring-boot-batch" include "spring-boot-project:spring-boot-data-jpa" include "spring-boot-project:spring-boot-dependencies" include "spring-boot-project:spring-boot-devtools" diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index 5e1e025eaa..8dd12fc5f0 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -155,7 +155,6 @@ dependencies { optional("org.springframework:spring-websocket") optional("org.springframework:spring-webflux") optional("org.springframework:spring-webmvc") - optional("org.springframework.batch:spring-batch-core") optional("org.springframework.data:spring-data-couchbase") optional("org.springframework.data:spring-data-envers") { exclude group: "javax.activation", module: "javax.activation-api" diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 824ee84d58..3fb36a1035 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -13,45 +13,6 @@ "description": "Whether subclass-based (CGLIB) proxies are to be created (true), as opposed to standard Java interface-based proxies (false).", "defaultValue": true }, - { - "name": "spring.batch.initialize-schema", - "type": "org.springframework.boot.sql.init.DatabaseInitializationMode", - "deprecation": { - "replacement": "spring.batch.jdbc.initialize-schema", - "level": "error" - } - }, - { - "name": "spring.batch.initializer.enabled", - "type": "java.lang.Boolean", - "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.", - "deprecation": { - "replacement": "spring.batch.jdbc.initialize-schema", - "level": "error" - } - }, - { - "name": "spring.batch.job.enabled", - "type": "java.lang.Boolean", - "description": "Execute all Spring Batch jobs in the context on startup.", - "defaultValue": true - }, - { - "name": "spring.batch.schema", - "type": "java.lang.String", - "deprecation": { - "replacement": "spring.batch.jdbc.schema", - "level": "error" - } - }, - { - "name": "spring.batch.table-prefix", - "type": "java.lang.String", - "deprecation": { - "replacement": "spring.batch.jdbc.table-prefix", - "level": "error" - } - }, { "name": "spring.cassandra.compression", "defaultValue": "none" diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories index 1b49878476..a6d937143d 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring.factories @@ -16,6 +16,5 @@ org.springframework.boot.autoconfigure.web.servlet.JspTemplateAvailabilityProvid # Depends on Database Initialization Detectors org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\ -org.springframework.boot.autoconfigure.batch.JobRepositoryDependsOnDatabaseInitializationDetector,\ org.springframework.boot.autoconfigure.quartz.SchedulerDependsOnDatabaseInitializationDetector,\ org.springframework.boot.autoconfigure.session.JdbcIndexedSessionRepositoryDependsOnDatabaseInitializationDetector diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 6e024778ae..f07db4f526 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1,5 +1,4 @@ org.springframework.boot.autoconfigure.aop.AopAutoConfiguration -org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration org.springframework.boot.autoconfigure.couchbase.CouchbaseAutoConfiguration diff --git a/spring-boot-project/spring-boot-batch/build.gradle b/spring-boot-project/spring-boot-batch/build.gradle new file mode 100644 index 0000000000..891af28b53 --- /dev/null +++ b/spring-boot-project/spring-boot-batch/build.gradle @@ -0,0 +1,31 @@ +plugins { + id "java-library" + id "org.springframework.boot.auto-configuration" + id "org.springframework.boot.configuration-properties" + id "org.springframework.boot.deployed" + id "org.springframework.boot.optional-dependencies" +} + +description = "Spring Boot Batch" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + api(project(":spring-boot-project:spring-boot-jdbc")) + api("org.springframework.batch:spring-batch-core") + + implementation(project(":spring-boot-project:spring-boot-tx")) + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + optional(project(":spring-boot-project:spring-boot-jpa")) + + testImplementation(project(":spring-boot-project:spring-boot-flyway")) + testImplementation(project(":spring-boot-project:spring-boot-liquibase")) + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + testImplementation(testFixtures(project(":spring-boot-project:spring-boot-autoconfigure"))) + + testRuntimeOnly("ch.qos.logback:logback-classic") + testRuntimeOnly("com.fasterxml.jackson.core:jackson-databind") + testRuntimeOnly("com.h2database:h2") + testRuntimeOnly("com.zaxxer:HikariCP") +} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfiguration.java similarity index 99% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfiguration.java index e04d268219..17f6fe1efa 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfiguration.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.util.List; @@ -67,7 +67,7 @@ import org.springframework.util.StringUtils; * @author Lars Uffmann * @author Lasse Wulff * @author Yanming Zhou - * @since 1.0.0 + * @since 4.0.0 */ @AutoConfiguration(after = TransactionAutoConfiguration.class, afterName = "org.springframework.boot.jpa.autoconfigure.hibernate.HibernateJpaAutoConfiguration") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchConversionServiceCustomizer.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchConversionServiceCustomizer.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchConversionServiceCustomizer.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchConversionServiceCustomizer.java index 21233ef522..a24dd754f1 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchConversionServiceCustomizer.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchConversionServiceCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import org.springframework.batch.core.configuration.support.DefaultBatchConfiguration; import org.springframework.core.convert.support.ConfigurableConversionService; @@ -26,7 +26,7 @@ import org.springframework.core.convert.support.ConfigurableConversionService; * DefaultBatchConfiguration} while retaining its default auto-configuration. * * @author Claudio Nave - * @since 3.1.0 + * @since 4.0.0 */ @FunctionalInterface public interface BatchConversionServiceCustomizer { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchDataSource.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchDataSource.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchDataSource.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchDataSource.java index fe12c8fd2d..619ad91fc6 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchDataSource.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -31,7 +31,7 @@ import org.springframework.context.annotation.Primary; * {@link Primary @Primary}. * * @author Dmytro Nosan - * @since 2.2.0 + * @since 4.0.0 */ @Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchDataSourceScriptDatabaseInitializer.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchDataSourceScriptDatabaseInitializer.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchDataSourceScriptDatabaseInitializer.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchDataSourceScriptDatabaseInitializer.java index c45b5e9a0f..e7d86433a3 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchDataSourceScriptDatabaseInitializer.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchDataSourceScriptDatabaseInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.util.List; @@ -33,7 +33,7 @@ import org.springframework.util.StringUtils; * @author Vedran Pavic * @author Andy Wilkinson * @author Phillip Webb - * @since 2.6.0 + * @since 4.0.0 */ public class BatchDataSourceScriptDatabaseInitializer extends DataSourceScriptDatabaseInitializer { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchProperties.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchProperties.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchProperties.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchProperties.java index e12e471756..4a2b8df862 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchProperties.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.sql.init.DatabaseInitializationMode; @@ -28,7 +28,7 @@ import org.springframework.transaction.annotation.Isolation; * @author Vedran Pavic * @author Mukul Kumar Chaundhyan * @author Yanming Zhou - * @since 1.2.0 + * @since 4.0.0 */ @ConfigurationProperties("spring.batch") public class BatchProperties { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchTaskExecutor.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchTaskExecutor.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchTaskExecutor.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchTaskExecutor.java index 4a623125ab..af77dac99e 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchTaskExecutor.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchTaskExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -32,7 +32,7 @@ import org.springframework.core.task.TaskExecutor; * another one marked as {@link Primary @Primary}. * * @author Andy Wilkinson - * @since 3.4.0 + * @since 4.0.0 */ @Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchTransactionManager.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchTransactionManager.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchTransactionManager.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchTransactionManager.java index 208257106d..ba4a01fd0c 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/BatchTransactionManager.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/BatchTransactionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -32,7 +32,7 @@ import org.springframework.transaction.PlatformTransactionManager; * there is another one marked as {@link Primary @Primary}. * * @author Lasse Wulff - * @since 3.3.0 + * @since 4.0.0 */ @Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobExecutionEvent.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobExecutionEvent.java similarity index 90% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobExecutionEvent.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobExecutionEvent.java index 3d8191d25a..b9656b0e99 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobExecutionEvent.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobExecutionEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import org.springframework.batch.core.JobExecution; import org.springframework.context.ApplicationEvent; @@ -23,7 +23,7 @@ import org.springframework.context.ApplicationEvent; * Spring {@link ApplicationEvent} encapsulating a {@link JobExecution}. * * @author Dave Syer - * @since 1.0.0 + * @since 4.0.0 */ @SuppressWarnings("serial") public class JobExecutionEvent extends ApplicationEvent { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobExecutionExitCodeGenerator.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobExecutionExitCodeGenerator.java similarity index 91% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobExecutionExitCodeGenerator.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobExecutionExitCodeGenerator.java index c2038935ab..9d95a00031 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobExecutionExitCodeGenerator.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobExecutionExitCodeGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; @@ -27,7 +27,7 @@ import org.springframework.context.ApplicationListener; * {@link ExitCodeGenerator} for {@link JobExecutionEvent}s. * * @author Dave Syer - * @since 1.0.0 + * @since 4.0.0 */ public class JobExecutionExitCodeGenerator implements ApplicationListener, ExitCodeGenerator { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunner.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobLauncherApplicationRunner.java similarity index 99% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunner.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobLauncherApplicationRunner.java index c96ef4e693..d897318e44 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunner.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobLauncherApplicationRunner.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.util.Arrays; import java.util.Collection; @@ -64,7 +64,7 @@ import org.springframework.util.StringUtils; * @author Mahmoud Ben Hassine * @author Stephane Nicoll * @author Akshay Dubey - * @since 2.3.0 + * @since 4.0.0 */ public class JobLauncherApplicationRunner implements ApplicationRunner, InitializingBean, Ordered, ApplicationEventPublisherAware { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobRepositoryDependsOnDatabaseInitializationDetector.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobRepositoryDependsOnDatabaseInitializationDetector.java similarity index 92% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobRepositoryDependsOnDatabaseInitializationDetector.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobRepositoryDependsOnDatabaseInitializationDetector.java index 7efefb6506..600b4cd173 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/JobRepositoryDependsOnDatabaseInitializationDetector.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/JobRepositoryDependsOnDatabaseInitializationDetector.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.util.Collections; import java.util.Set; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/package-info.java b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/package-info.java similarity index 84% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/package-info.java rename to spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/package-info.java index 335175f168..854a798c05 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/batch/package-info.java +++ b/spring-boot-project/spring-boot-batch/src/main/java/org/springframework/boot/batch/autoconfigure/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,4 +17,4 @@ /** * Auto-configuration for Spring Batch. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; diff --git a/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000000..2cce21b301 --- /dev/null +++ b/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,43 @@ +{ + "properties": [ + { + "name": "spring.batch.initialize-schema", + "type": "org.springframework.boot.sql.init.DatabaseInitializationMode", + "deprecation": { + "replacement": "spring.batch.jdbc.initialize-schema", + "level": "error" + } + }, + { + "name": "spring.batch.initializer.enabled", + "type": "java.lang.Boolean", + "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.", + "deprecation": { + "replacement": "spring.batch.jdbc.initialize-schema", + "level": "error" + } + }, + { + "name": "spring.batch.job.enabled", + "type": "java.lang.Boolean", + "description": "Execute all Spring Batch jobs in the context on startup.", + "defaultValue": true + }, + { + "name": "spring.batch.schema", + "type": "java.lang.String", + "deprecation": { + "replacement": "spring.batch.jdbc.schema", + "level": "error" + } + }, + { + "name": "spring.batch.table-prefix", + "type": "java.lang.String", + "deprecation": { + "replacement": "spring.batch.jdbc.table-prefix", + "level": "error" + } + } + ] +} \ No newline at end of file diff --git a/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring.factories b/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000000..f1572ab573 --- /dev/null +++ b/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Depends on Database Initialization Detectors +org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector=\ +org.springframework.boot.batch.autoconfigure.JobRepositoryDependsOnDatabaseInitializationDetector diff --git a/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..6f1b751490 --- /dev/null +++ b/spring-boot-project/spring-boot-batch/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +org.springframework.boot.batch.autoconfigure.BatchAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfigurationTests.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java rename to spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfigurationTests.java index 18607863ed..31c9f40067 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfigurationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.util.Arrays; import java.util.Collection; @@ -58,8 +58,8 @@ import org.springframework.boot.CommandLineRunner; import org.springframework.boot.DefaultApplicationArguments; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration.SpringBootBatchConfiguration; -import org.springframework.boot.autoconfigure.batch.domain.City; +import org.springframework.boot.batch.autoconfigure.BatchAutoConfiguration.SpringBootBatchConfiguration; +import org.springframework.boot.batch.autoconfigure.domain.City; import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration; import org.springframework.boot.jdbc.DataSourceBuilder; import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration; @@ -569,13 +569,13 @@ class BatchAutoConfigurationTests { @Bean DataSource normalDataSource() { - return DataSourceBuilder.create().url("jdbc:hsqldb:mem:normal").username("sa").build(); + return DataSourceBuilder.create().url("jdbc:h2:mem:normal").username("sa").build(); } @BatchDataSource @Bean(defaultCandidate = false) DataSource batchDataSource() { - return DataSourceBuilder.create().url("jdbc:hsqldb:mem:batchdatasource").username("sa").build(); + return DataSourceBuilder.create().url("jdbc:h2:mem:batchdatasource").username("sa").build(); } } @@ -585,7 +585,7 @@ class BatchAutoConfigurationTests { @Bean DataSource dataSource() { - return DataSourceBuilder.create().url("jdbc:hsqldb:mem:database").username("sa").build(); + return DataSourceBuilder.create().url("jdbc:h2:mem:database").username("sa").build(); } @Bean diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationWithoutJpaTests.java b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfigurationWithoutJpaTests.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationWithoutJpaTests.java rename to spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfigurationWithoutJpaTests.java index ecbca8bd10..feefb9624d 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationWithoutJpaTests.java +++ b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchAutoConfigurationWithoutJpaTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import javax.sql.DataSource; @@ -26,8 +26,8 @@ import org.springframework.batch.core.launch.JobLauncher; import org.springframework.batch.core.repository.JobRepository; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage; -import org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration.SpringBootBatchConfiguration; -import org.springframework.boot.autoconfigure.batch.domain.City; +import org.springframework.boot.batch.autoconfigure.BatchAutoConfiguration.SpringBootBatchConfiguration; +import org.springframework.boot.batch.autoconfigure.domain.City; import org.springframework.boot.jdbc.autoconfigure.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.jdbc.autoconfigure.EmbeddedDataSourceConfiguration; import org.springframework.boot.sql.init.DatabaseInitializationMode; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchDataSourceScriptDatabaseInitializerTests.java b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchDataSourceScriptDatabaseInitializerTests.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchDataSourceScriptDatabaseInitializerTests.java rename to spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchDataSourceScriptDatabaseInitializerTests.java index f22813c623..6591074532 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchDataSourceScriptDatabaseInitializerTests.java +++ b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchDataSourceScriptDatabaseInitializerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.io.IOException; import java.sql.Connection; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchPropertiesTests.java b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchPropertiesTests.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchPropertiesTests.java rename to spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchPropertiesTests.java index a89fef9895..d585cd2efb 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/BatchPropertiesTests.java +++ b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/BatchPropertiesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/JobExecutionExitCodeGeneratorTests.java b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/JobExecutionExitCodeGeneratorTests.java similarity index 93% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/JobExecutionExitCodeGeneratorTests.java rename to spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/JobExecutionExitCodeGeneratorTests.java index 77ee10f69b..22ca6f6748 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/JobExecutionExitCodeGeneratorTests.java +++ b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/JobExecutionExitCodeGeneratorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import org.junit.jupiter.api.Test; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunnerTests.java b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/JobLauncherApplicationRunnerTests.java similarity index 98% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunnerTests.java rename to spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/JobLauncherApplicationRunnerTests.java index 3c7dbb393e..48ff5dcc49 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunnerTests.java +++ b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/JobLauncherApplicationRunnerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch; +package org.springframework.boot.batch.autoconfigure; import java.util.Arrays; import java.util.List; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/domain/City.java b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/domain/City.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/domain/City.java rename to spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/domain/City.java index 8cb58ea87c..8d43b51c3b 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/batch/domain/City.java +++ b/spring-boot-project/spring-boot-batch/src/test/java/org/springframework/boot/batch/autoconfigure/domain/City.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.batch.domain; +package org.springframework.boot.batch.autoconfigure.domain; import java.io.Serializable; diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/batch/custom-schema.sql b/spring-boot-project/spring-boot-batch/src/test/resources/org/springframework/boot/batch/autoconfigure/custom-schema.sql similarity index 100% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/resources/org/springframework/boot/autoconfigure/batch/custom-schema.sql rename to spring-boot-project/spring-boot-batch/src/test/resources/org/springframework/boot/batch/autoconfigure/custom-schema.sql diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 6a24710a2f..626fdad2c5 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1981,6 +1981,7 @@ bom { "spring-boot-artemis", "spring-boot-autoconfigure", "spring-boot-autoconfigure-processor", + "spring-boot-batch", "spring-boot-buildpack-platform", "spring-boot-configuration-metadata", "spring-boot-configuration-processor", diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 43e7069691..123e05f479 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -65,6 +65,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-artemis", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-batch", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-elasticsearch", configuration: "autoConfigurationMetadata")) @@ -99,6 +100,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-artemis", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-autoconfigure-all", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-batch", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-data-jpa", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-devtools", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-docker-compose", configuration: "configurationPropertiesMetadata")) diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-batch/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-batch/build.gradle index 7f27a2af88..ea44b6563e 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-batch/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-batch/build.gradle @@ -5,7 +5,7 @@ plugins { description = "Starter for using Spring Batch" dependencies { + api(project(":spring-boot-project:spring-boot-batch")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-jdbc")) - api("org.springframework.batch:spring-batch-core") }