Commit Graph

106 Commits

Author SHA1 Message Date
Starchenko Ilya
2bdf4283e0 Fix Javadoc of SpringBatchTest annotation
fix double @-symbol in javadoc

Issue #4102
2022-04-27 15:29:53 +02:00
Mahmoud Ben Hassine
86d03d041f Implement equals/hashcode in BatchTestContextCustomizer
Resolves #3940
2021-09-13 21:50:20 +02:00
Marten Deinum
737f6ace13 Added isXXXEnabled for logging statements
Guarded the logging statements which do concatenation of strings
or calling toString on objects. When a log level isn't enabled
this still would produce garbage that would need to be collected.

Guarded all logging up to info, warn and error can be assumed to be
enabled on a production system.
2021-03-17 15:01:41 +01:00
Mahmoud Ben Hassine
15d24b370f Update documentation with expected configuration to use @SpringBatchTest
Resolves #3699
2020-10-02 23:49:21 +02:00
Mahmoud Ben Hassine
c225c683a1 Polish 60bbc0052a
* Remove unused imports
* Update Javadoc
* Update year in license headers
2020-07-24 13:58:05 +02:00
이동욱
60bbc0052a Add getUniqueJobParametersBuilder() method in JobLauncherTestUtils
Issue #767
2020-07-24 13:48:39 +02:00
Mahmoud Ben Hassine
511e6c0f12 Polish 670b6408da
* Update year in license headers
* Update Javadoc
* Remove unused field JOB_PARAMETER_MAXIMUM
* Make SecureRandom an instance variable
2020-05-19 10:16:28 +02:00
Saikat Bhadra
670b6408da Change getUniqueJobParameters() to use random number generator that has a lower chance of repeating
Issue #821
2020-05-19 10:04:47 +02:00
Mahmoud Ben Hassine
fe51fde3a0 Meta-annotate @SpringBatchTest with @ExtendWith(SpringExtension.class)
Resolves #3647
2020-04-30 17:33:37 +02:00
mikeldpl
a7092a21e4 Added @Nullable annotation to overriding methods.
Resolves BATCH-2839
2019-09-17 16:50:44 +02:00
Spring Operator
d8fc58338d URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 2 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 1796 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-22 10:08:19 +01:00
Spring Operator
8762e34115 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd (301) with 29 occurrences migrated to:
  https://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/jobXML_1_0.xsd ([https](https://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd) result InvalidMediaTypeException).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd (301) with 1 occurrences migrated to:
  https://hibernate.org/dtd/hibernate-mapping-3.0.dtd ([https](https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd) result 200).
* http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd (301) with 2 occurrences migrated to:
  https://hibernate.org/dtd/hibernate-mapping-3.0.dtd ([https](https://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd) result 200).
* http://www.springframework.org/schema/aop/spring-aop-2.5.xsd with 5 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop-2.5.xsd ([https](https://www.springframework.org/schema/aop/spring-aop-2.5.xsd) result 200).
* http://www.springframework.org/schema/aop/spring-aop-3.1.xsd with 21 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop-3.1.xsd ([https](https://www.springframework.org/schema/aop/spring-aop-3.1.xsd) result 200).
* http://www.springframework.org/schema/aop/spring-aop.xsd with 27 occurrences migrated to:
  https://www.springframework.org/schema/aop/spring-aop.xsd ([https](https://www.springframework.org/schema/aop/spring-aop.xsd) result 200).
* http://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd with 16 occurrences migrated to:
  https://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd ([https](https://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-2.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-2.0.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-2.0.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-2.1.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-2.1.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-2.1.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-2.2.xsd with 99 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-2.2.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-2.2.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch-3.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch-3.0.xsd ([https](https://www.springframework.org/schema/batch/spring-batch-3.0.xsd) result 200).
* http://www.springframework.org/schema/batch/spring-batch.xsd with 51 occurrences migrated to:
  https://www.springframework.org/schema/batch/spring-batch.xsd ([https](https://www.springframework.org/schema/batch/spring-batch.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans-2.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.0.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.0.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans-2.5.xsd with 14 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-2.5.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-2.5.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans-3.1.xsd with 145 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans-3.1.xsd ([https](https://www.springframework.org/schema/beans/spring-beans-3.1.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans.xsd with 166 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context-2.5.xsd with 8 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-2.5.xsd ([https](https://www.springframework.org/schema/context/spring-context-2.5.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context-3.1.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.1.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.1.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context-3.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context-3.2.xsd ([https](https://www.springframework.org/schema/context/spring-context-3.2.xsd) result 200).
* http://www.springframework.org/schema/context/spring-context.xsd with 15 occurrences migrated to:
  https://www.springframework.org/schema/context/spring-context.xsd ([https](https://www.springframework.org/schema/context/spring-context.xsd) result 200).
* http://www.springframework.org/schema/data/jpa/spring-jpa.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/data/jpa/spring-jpa.xsd ([https](https://www.springframework.org/schema/data/jpa/spring-jpa.xsd) result 200).
* http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd ([https](https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd) result 200).
* http://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd ([https](https://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd) result 200).
* http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd ([https](https://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd) result 200).
* http://www.springframework.org/schema/integration/spring-integration.xsd with 27 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration.xsd ([https](https://www.springframework.org/schema/integration/spring-integration.xsd) result 200).
* http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd) result 200).
* http://www.springframework.org/schema/jdbc/spring-jdbc.xsd with 3 occurrences migrated to:
  https://www.springframework.org/schema/jdbc/spring-jdbc.xsd ([https](https://www.springframework.org/schema/jdbc/spring-jdbc.xsd) result 200).
* http://www.springframework.org/schema/jms/spring-jms.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/jms/spring-jms.xsd ([https](https://www.springframework.org/schema/jms/spring-jms.xsd) result 200).
* http://www.springframework.org/schema/lang/spring-lang.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/lang/spring-lang.xsd ([https](https://www.springframework.org/schema/lang/spring-lang.xsd) result 200).
* http://www.springframework.org/schema/rabbit/spring-rabbit.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/rabbit/spring-rabbit.xsd ([https](https://www.springframework.org/schema/rabbit/spring-rabbit.xsd) result 200).
* http://www.springframework.org/schema/task/spring-task-3.0.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/task/spring-task-3.0.xsd ([https](https://www.springframework.org/schema/task/spring-task-3.0.xsd) result 200).
* http://www.springframework.org/schema/task/spring-task.xsd with 2 occurrences migrated to:
  https://www.springframework.org/schema/task/spring-task.xsd ([https](https://www.springframework.org/schema/task/spring-task.xsd) result 200).
* http://www.springframework.org/schema/tx/spring-tx-2.5.xsd with 8 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx-2.5.xsd ([https](https://www.springframework.org/schema/tx/spring-tx-2.5.xsd) result 200).
* http://www.springframework.org/schema/tx/spring-tx-3.1.xsd with 16 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx-3.1.xsd ([https](https://www.springframework.org/schema/tx/spring-tx-3.1.xsd) result 200).
* http://www.springframework.org/schema/tx/spring-tx.xsd with 21 occurrences migrated to:
  https://www.springframework.org/schema/tx/spring-tx.xsd ([https](https://www.springframework.org/schema/tx/spring-tx.xsd) result 200).
* http://www.springframework.org/schema/util/spring-util-3.1.xsd with 9 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util-3.1.xsd ([https](https://www.springframework.org/schema/util/spring-util-3.1.xsd) result 200).
* http://www.springframework.org/schema/util/spring-util.xsd with 15 occurrences migrated to:
  https://www.springframework.org/schema/util/spring-util.xsd ([https](https://www.springframework.org/schema/util/spring-util.xsd) result 200).
* http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd with 3 occurrences migrated to:
  https://java.sun.com/xml/ns/persistence/persistence_1_0.xsd ([https](https://java.sun.com/xml/ns/persistence/persistence_1_0.xsd) result 302).

# Ignored
These URLs were intentionally ignored.

* http://java.sun.com/xml/ns/persistence with 6 occurrences
* http://www.springframework.org/schema/aop with 104 occurrences
* http://www.springframework.org/schema/batch with 343 occurrences
* http://www.springframework.org/schema/batch-integration with 32 occurrences
* http://www.springframework.org/schema/batch/test with 1 occurrences
* http://www.springframework.org/schema/beans with 673 occurrences
* http://www.springframework.org/schema/context with 52 occurrences
* http://www.springframework.org/schema/data/jpa with 2 occurrences
* http://www.springframework.org/schema/integration with 65 occurrences
* http://www.springframework.org/schema/integration/jdbc with 2 occurrences
* http://www.springframework.org/schema/integration/jms with 6 occurrences
* http://www.springframework.org/schema/jdbc with 8 occurrences
* http://www.springframework.org/schema/jms with 3 occurrences
* http://www.springframework.org/schema/lang with 2 occurrences
* http://www.springframework.org/schema/p with 60 occurrences
* http://www.springframework.org/schema/rabbit with 2 occurrences
* http://www.springframework.org/schema/task with 6 occurrences
* http://www.springframework.org/schema/tx with 89 occurrences
* http://www.springframework.org/schema/util with 48 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 330 occurrences
* http://xmlns.jcp.org/xml/ns/javaee with 82 occurrences
2019-03-21 10:59:44 +01:00
Sam Brannen
d9bbb0ecda Simplify BatchTestContextCustomizerFactory
Since @SpringBatchTest is effectively a marker annotation from the
perspective of BatchTestContextCustomizerFactory, there is no need
to retrieve the merged, synthesized annotation.

Checking for the presence of @SpringBatchTest is sufficient.
2019-03-14 12:04:32 +01:00
Drummond Dawson
42c0614742 Replace explicit type with diamond operator in test module 2018-11-06 21:30:36 +01:00
Mahmoud Ben Hassine
249fa2673e Fix typos 2018-10-02 22:40:56 +02:00
Mahmoud Ben Hassine
70d0e3c510 Add JSR-305 annotations to public APIs
(Partially) Resolves BATCH-2688
2018-08-31 15:11:50 -05:00
Mahmoud Ben Hassine
909231c577 Polish 305b4b8b03 2018-08-13 10:34:44 +02:00
Drummond Dawson
305b4b8b03 BATCH-2698: Remove commons io from test module
Prefer Files.lines over common io's readLines
2018-08-13 09:53:08 +02:00
Mahmoud Ben Hassine
0dab67c936 Add a new annotation @SpringBatchTest to simplify testing
This commit adds a new annotation `@SpringBatchTest` that:

* configures two beans `JobLauncherTestUtils` and `JobRepositoryTestUtils`
in the test context.

* imports the `StepScopeTestExecutionListener` and
`JobScopeTestExecutionListener` as test execution listeners.

Resolves BATCH-2718
2018-05-30 13:41:20 -05:00
Michael Minella
f61679b55f Added updates for properties files as well 2017-11-27 12:06:29 -06:00
Michael Minella
52d2c257c5 Version updates 2017-10-23 15:52:55 -05:00
Michael Minella
24fbb882e6 Updated job.adoc to have java config examples
This commit addresses the job.adoc and how to configure the various
pieces of the framework it covers via java configuration.
2017-10-18 12:00:27 -05:00
Michael Minella
b180c75ce0 Housecleaning of build warnings 2017-09-15 15:58:22 -05:00
Glenn Renfro
6bdbe3029e Remove JavaDoc warnings part 2 2017-09-12 10:52:22 -05:00
Michael Minella
263e978a1f Updated for various code warnings
This commit addresses a number of deprications and other code warnings.
There are still many more to address, but this is a start.
2017-05-02 12:48:03 -05:00
Michael Minella
26b02fb836 Replaced snapshot versions and addressed deprications
This commit moves all SNAPSHOT dependencies to the latest available
released versions.  It also addresses a number of deprications in the
Spring Data realm.  Specifically around the deprication of the
Neo4JOperations and the package reorganization within Hibernate.
2016-12-30 14:04:58 -06:00
Philippe Marschall
dcc9da8273 BATCH-2407 Use StringBuilder instead of StringBuffer
With Java 1.5 StringBuilder is preferred over StringBuffer for single
threaded access as is has less overhead.

This is evidenced by the class comment of StringBuffer and Effective
Java 2nd Edition Item 67: Avoid excessive synchronization.

> The StringBuilder class should generally be used in preference to
> this one, as it supports all of the same operations but it is faster,
> as it performs no synchronization.

 - replace StringBuffer with StringBuilder where possible

Issue: BATCH-2407
2015-08-06 10:22:39 -05:00
Philippe Marschall
7092102748 BATCH-2411 Remove @SuppressWarnings("unchecked")
The source code contains various @SuppressWarnings("unchecked") that
are no longer unnecessary since the relevant APIs have been upgraded to
support Java 5 generics.

 - remove @SuppressWarnings("unchecked") where no longer unnecessary

Issue: BATCH-2411
2015-08-05 18:04:40 -05:00
Philippe Marschall
7ec7152c5e BATCH-2410 junit.framework.Assert is deprecated 2015-07-31 12:44:25 -05:00
Michael Minella
7c60b055c3 Removed dependency on ParameterizedRowMapper
To support Spring Framework 4.2 which removes ParameterizedRowMapper,
all references to that were switched to RowMapper.  As of Spring 3, the
interfaces are identicle so this should cause no backward compatability
issues.

BATCH-2369
2015-03-31 14:08:38 -05:00
Michael Minella
f865eb0135 Add explicit call to afterPropertiesSet to a Flow when using Java config
When using java config, the call to SimpleFlow#afterPropertiesSet is not
called in all cases as noted in BATCH-2291.  This commit updates the
builder to explicitly make the call, and updates the SimpleFlow to be
idempotent for calls to afterPropertiesSet.
2014-10-15 14:36:13 -05:00
Chris Schaefer
3eb7511322 Handle TestContext class to interface conversion from Spring 3 to Spring 4
Use reflection to make calls to the provided TestContext in StepScopeTestExecutionListener
Enables usage of Spring 4 w/ Batch 2.2 (in this case)
2014-05-22 11:19:36 -05:00
Michael Minella
39bb979a51 BATCH-2233: Moved JsrTestUtils to a location that is actually published with the release 2014-05-15 14:54:26 -05:00
Michael Minella
e7a4e348a5 BATCH-2229 & BATCH-2218: Removed OSGi related metadata and Maven POMs 2014-05-12 15:32:02 -05:00
Michael Minella
6d94ae9031 Updated hsqldb urls to use MVCC mode 2014-05-05 15:08:05 -05:00
jpraet
b26d272d43 cleanup 2014-04-02 14:35:53 -04:00
Michael Minella
1c42d8807c BATCH-2169: Added warning message for when users use java config with @StepScope 2014-02-21 16:59:53 -06:00
Michael Minella
241d9f101f BATCH-1701: Implementation of JobScope
* Updated Job and Step scopes to use common class introduced by jpraet
* Updated Job and Step Synchronization Managers to use common class
 introduced by jpraet
* Updated JobScope related code to not be concerned with Spring 2.5
 (which is what batch was on when the PR was opened).
2013-12-16 09:21:27 -06:00
jpraet
2436d84210 BATCH-1701: Introduce job scope 2013-12-13 16:44:15 -06:00
Michael Minella
ce16ad2b03 BATCH-2007: Added a JobOperator implementation that complies with JSR-352.
* Added JsrJobOperator
* Added a ParametersConverter (and JSR-352 implementation) that converts parameters as specified by the JSR to JobParameters and back
* Added a method to the JobRepository to allow the direct creation of a JobInstance (since the JSR requires a new instance for each call to JobOperator#start
* Added a base context to be bootstrapped when the JobOperator is first referenced.  It provides things like a JobRepository, etc.
2013-08-04 11:49:48 -05:00
Michael Minella
557515df45 BATCH-1412: Implementing non-identifying job parameters 2013-02-05 17:39:12 +00:00
Michael Minella
ca9d00d1a2 Updated to support new 2.2 schema 2013-01-24 13:03:41 -06:00
Dave Syer
bc9ee74a25 BATCH-1950: Patch up build
* Ensure bundlor is available and remove from sample
* Tidy dependencies in some poms
* Update some template.mf dependencies
* Add .travis.yml for automated builds independent of bamboo
2013-01-18 13:46:02 +00:00
Chris Schaefer
a6ab68bbbb BATCH-1940: Replace org.springframework.batch.support.JdbcTestUtils with org.springframework.test.jdbc.JdbcTestUtils 2012-12-31 08:35:06 -06:00
Chris Schaefer
a583c3a421 BATCH-1915: Change minimum compiler level to 1.6 and use @Override everywhere 2012-12-27 17:45:28 -05:00
Dave Syer
f63f67c65a BATCH-1913: Add step builders 2012-12-04 18:12:20 +00:00
Chris Schaefer
d0e0334674 BATCH-1891: Migrate usage of deprecated classes 2012-09-21 09:29:13 +01:00
Chris Schaefer
d512ba8ff2 BATCH-1685: Upgrade minimum support level for Spring to 3.1.2 2012-09-12 06:08:36 +01:00
Dave Syer
7476ac1628 Upgrade site plugin and ensure tables parse correctly 2012-08-28 10:44:04 +01:00
David Thexton
00aab3eafa Add tests and implement fix for very quick running (<1ms) jobs (incorporating suggestions made) 2012-05-16 12:44:18 +01:00