6613 Commits

Author SHA1 Message Date
martinfrancois
639d64f872 Fail test if no exception is thrown in testErrorMessageWhenNoLineTokenizerWasProvided
Signed-off-by: martinfrancois <f.martin@fastmail.com>
2025-06-13 16:53:16 +02:00
Patrick Baumgartner
c329b9fd9b Throwing error when TargetType and FieldSetMapper is provided
Co-authored-by: martinfrancois <f.martin@fastmail.com>
Signed-off-by: Patrick Baumgartner <patrick.baumgartner@42talents.com>
Signed-off-by: martinfrancois <f.martin@fastmail.com>
2025-06-13 16:47:35 +02:00
martinfrancois
673cfe3013 Refactor proxy hints for better type safety
Signed-off-by: martinfrancois <f.martin@fastmail.com>
2025-06-13 15:01:38 +02:00
Andrey Litvitski
369652cc73 Update GraalVM runtime hints
Resolves #4844

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
2025-06-13 13:48:50 +02:00
Patrick Schwizer
6a4d94575e remove JobRegistrySmartInitializingSingleton usage
Signed-off-by: Patrick Schwizer <schwizer.p@proton.me>
2025-06-13 12:13:29 +02:00
martinfrancois
3eaf8d9ac9 Use Docker for integration tests related to Kafka support
Co-authored-by: patbaumgartner <contact@patbaumgartner.com>
Signed-off-by: martinfrancois <f.martin@fastmail.com>
2025-06-13 12:07:21 +02:00
Mahmoud Ben Hassine
d95397faf0 Move job and step APIs in their dedicated packages
Resolves #4877
2025-06-12 10:45:08 +02:00
Mahmoud Ben Hassine
bfe487cccc Deprecate redundant APIs
This commit deprecates redundant APIs to simplify the way to
configure and use Spring Batch. The most notable changes are:

- JobLauncher is deprecated in favor of JobOperator
- JobExplorer is deprecated in favor of JobRepository
- CommandLineJobRunner is deprecated in favor of more
modern alternatives like Spring Boot's job Launcher

Other APIs that are only used in the newly deprecated APIs
have been deprecated as well.

Resolves #4847
2025-06-12 08:25:03 +02:00
Mahmoud Ben Hassine
4fbac1f9e5 Update javadocs 2025-06-11 15:54:03 +02:00
Mahmoud Ben Hassine
e35c87ccdd Fix tests 2025-06-09 15:43:52 +02:00
Mahmoud Ben Hassine
72694e628d Remove build failure on warnings 2025-06-09 13:53:03 +02:00
Mahmoud Ben Hassine
c872a12ad5 Deprecate JobLocator in favor of JobRegistry
Related to #4847
2025-06-09 13:31:04 +02:00
Mahmoud Ben Hassine
8fbda369a8 Remove usage of ListableJobLocator in TaskExecutorJobOperator 2025-06-09 13:17:59 +02:00
Mahmoud Ben Hassine
90f7398222 Move listener APIs under core.listener package
Resolves #4867
2025-06-09 12:32:56 +02:00
Mahmoud Ben Hassine
bcf4f724ad Deprecate unused APIs
Related to #4847
Resolves #4866
2025-06-09 12:17:31 +02:00
Glenn Renfro
f050bd7062 Remove unused imports
Because of some of the corrections made to resolve issues that ErrorProne identified, some of the old imports are no longer valid.
2025-06-09 09:54:50 +02:00
Mahmoud Ben Hassine
378d1ff100 Override getJobNames in ResourcelessJobRepository 2025-06-09 09:45:08 +02:00
sjiwon
30b5120c93 Use type-safe constants in ExitStatus#isRunning
Signed-off-by: sjiwon <sjiwon4491@gmail.com>
2025-06-04 09:19:59 +02:00
jbotuck
b9b08bfb22 Mark argument to equals as nullable
Signed-off-by: jbotuck <jbotuck@gmail.com>
2025-06-04 01:32:23 +02:00
Jisu Lee
74de2e85be Fix javadoc in JdbcCursorItemReaderBuilder
- JdbcCursorItemReaderBuilder.queryTimeout(int) -> milliseconds
  - but, AbstractCursorItemReader.setQueryTimeout(int) -> seconds

Signed-off-by: Jisu Lee <itis821@gmail.com>
2025-06-04 01:17:12 +02:00
Mahmoud Ben Hassine
a698567e36 Extract error prone version as a property 2025-06-04 01:05:23 +02:00
Stefano Cordio
74975c506d Introduce ErrorProne, fix compiler warnings
Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
2025-06-04 00:53:02 +02:00
Stefano Cordio
3f0857b414 Remove unnecessary reflection in RemoteChunkHandlerFactoryBean
Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
2025-06-04 00:43:25 +02:00
Mahmoud Ben Hassine
0164216bff Fix JdbcStepExecutionDaoTests 2025-06-04 00:01:49 +02:00
Yanming Zhou
b88e7d70e9 Use jdbcTemplate.queryForStream().findFirst() where appropriate
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:45:38 +02:00
Yanming Zhou
92a304e552 Improve update sql for optimistic locking
The version to be updated could be computed at server side instead of client side, it will save one parameter of prepared statement.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:40:52 +02:00
Yanming Zhou
22cfc55f7a Polishing sql files
1. `\s+,\s*$` -> `,`
2. `\s+\(\s*$` -> ` (`

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:37:58 +02:00
Yanming Zhou
549c1ef7c7 Add version to delete sql for optimistic locking
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:35:48 +02:00
Yanming Zhou
782735ad2d Reuse existing SQL where feasible
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:29:31 +02:00
Yanming Zhou
dcf95987c9 Polish MongoDB integration tests
Move MongoDB container setup from tests to centralized configuration

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:20:39 +02:00
Yanming Zhou
a3e59b526e Improve performance of JdbcStepExecutionDao::getStepExecution
`JOB_EXECUTION_ID = ?` in where clause is unnecessary since `STEP_EXECUTION_ID` is primary key.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:11:57 +02:00
Mahmoud Ben Hassine
bb2440fea3 Add ability to use bean names by default for jobs and steps
Resolves #4858
2025-06-03 22:53:10 +02:00
Mahmoud Ben Hassine
a7f090a45d Make MapJobRegistry smart to auto register jobs at startup
Before this commit, it was required to populate the job registry
with a different component (like a bean post processor or a smart
initializing singleton) before being able to use it with the JobOperator.

This commit makes the `MapJobRegistry` smart enough to auto register
jobs defined in the application context. This removes the need for a
distinct component to populate the registry and therefore simplifies
the configuration.

This commit also:

- removes the usage of `JobFactory` from `JobRegistry`
- deprecates JobRegistrySmartInitializingSingleton and removes
its configuration from the default batch configuration

Resolves #4854
Resolves #4855
Resolves #4856
2025-06-02 18:29:48 +02:00
Mahmoud Ben Hassine
08c4cb16b8 Move core partitioning APIs under org.springframework.batch.core.partition
Resolves #4849
2025-05-23 16:42:07 +02:00
Mahmoud Ben Hassine
9eafb31af4 Move DAOs implementations to separate packages
Resolves #4848
2025-05-23 16:26:23 +02:00
Mahmoud Ben Hassine
d6ce07ba83 Rename JobExplorerFactoryBean to JdbcJobExplorerFactoryBean
Resolves #4846
2025-05-23 15:23:43 +02:00
Mahmoud Ben Hassine
8dde8529d3 Make JobOperator use domain types in method signatures
Resolves #4845
2025-05-22 19:06:21 +02:00
Mahmoud Ben Hassine
f7fcfaa4fd Improve batch infrastructure configuration
Before this commit, EnableBatchProcessing was tied to a JDBC
infrastructure. Therefore, it was impossible to use a non-JDBC
job repository with that annotation.

This commit removes the dependency to a JDBC infrastructure from
EnableBatchProcessing and introduces new annotations to configure
specific job repository implementations. It also updates the
programmatic way of configuring infrastructure beans with a base
configuration class for each supported job repository implementation.

NB: The XML namespace was not changed accordingly as the XSD will not
be updated starting from v6.

Resolves #4718
2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
25525ff98d Fix code style/formatting 2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
880779458e Override getJobInstanceCount in ResourcelessJobRepository 2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
4c86f33da9 Add support to configure JobKeyGenerator in MongoJobRepository 2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
58ef32e7a0 Override methods of base class in JdbcJobRepositoryFactoryBean 2025-05-22 11:44:07 +02:00
Glenn Renfro
d7f1c1d79f Replace section discussing CLA in the PR Template with DCO 2025-05-14 07:19:27 -04:00
Mahmoud Ben Hassine
c6f88b8aeb Fix javadocs 2025-05-08 00:16:45 +02:00
Mahmoud Ben Hassine
e5bda0d40a Rename SimpleJobOperator to TaskExecutorJobOperator
Resolves #4834
2025-05-07 23:55:27 +02:00
Mahmoud Ben Hassine
2514346441 Deprecate JobOperator#start(String, Properties)
This commit deprecates JobOperator#start(String, Properties)
in favor of an overloaded method that uses domain types Job
and JobParameters.
2025-05-07 23:41:47 +02:00
Mahmoud Ben Hassine
b11c4b019b Reorganize methods in JobOperator 2025-05-07 23:16:27 +02:00
Mahmoud Ben Hassine
afdd842bc3 Improve JobOperator by reducing its scope to job operations only
Resolves #4833
2025-05-07 23:08:35 +02:00
Mahmoud Ben Hassine
fc4a66516a Make JobOperator extend JobLauncher
Related to #4832
2025-05-07 22:03:03 +02:00
Mahmoud Ben Hassine
adffc588b6 Temporarily disable DB2 docker-based integration tests
Related to #4828
2025-05-07 15:52:52 +02:00