Rename samples base package to org.springframework.batch.samples
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -229,7 +229,7 @@
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<configuration>
|
||||
<excludePackageNames>
|
||||
org.springframework.batch.sample.*
|
||||
org.springframework.batch.samples.*
|
||||
</excludePackageNames>
|
||||
<overview>${project.basedir}/spring-batch-docs/src/main/javadoc/overview.html</overview>
|
||||
<detectJavaApiLink>false</detectJavaApiLink>
|
||||
|
||||
@@ -334,7 +334,7 @@ public SpringValidator validator() {
|
||||
XML::
|
||||
+
|
||||
.XML Configuration
|
||||
[source, xml]
|
||||
[source,xml]
|
||||
----
|
||||
<bean class="org.springframework.batch.item.validator.ValidatingItemProcessor">
|
||||
<property name="validator" ref="validator" />
|
||||
@@ -342,7 +342,7 @@ XML::
|
||||
|
||||
<bean id="validator" class="org.springframework.batch.item.validator.SpringValidator">
|
||||
<property name="validator">
|
||||
<bean class="org.springframework.batch.sample.domain.trade.internal.validator.TradeValidator"/>
|
||||
<bean class="org.springframework.batch.samples.domain.trade.internal.validator.TradeValidator"/>
|
||||
</property>
|
||||
</bean>
|
||||
----
|
||||
|
||||
@@ -156,7 +156,7 @@ The following example shows how to inject an `ItemReader` into a `Step` in XML:
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="sql" value="select ID, NAME, CREDIT from CUSTOMER"/>
|
||||
<property name="rowMapper">
|
||||
<bean class="org.springframework.batch.sample.domain.CustomerCreditRowMapper"/>
|
||||
<bean class="org.springframework.batch.samples.domain.CustomerCreditRowMapper"/>
|
||||
</property>
|
||||
</bean>
|
||||
----
|
||||
@@ -344,7 +344,7 @@ examples:
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
<property name="procedureName" value="sp_customer_credit"/>
|
||||
<property name="rowMapper">
|
||||
<bean class="org.springframework.batch.sample.domain.CustomerCreditRowMapper"/>
|
||||
<bean class="org.springframework.batch.samples.domain.CustomerCreditRowMapper"/>
|
||||
</property>
|
||||
</bean>
|
||||
----
|
||||
@@ -394,7 +394,7 @@ XML:
|
||||
<property name="procedureName" value="sp_customer_credit"/>
|
||||
<property name="refCursorPosition" value="1"/>
|
||||
<property name="rowMapper">
|
||||
<bean class="org.springframework.batch.sample.domain.CustomerCreditRowMapper"/>
|
||||
<bean class="org.springframework.batch.samples.domain.CustomerCreditRowMapper"/>
|
||||
</property>
|
||||
</bean>
|
||||
----
|
||||
@@ -440,7 +440,7 @@ The following example shows property to `true` in XML:
|
||||
<property name="procedureName" value="sp_customer_credit"/>
|
||||
<property name="function" value="true"/>
|
||||
<property name="rowMapper">
|
||||
<bean class="org.springframework.batch.sample.domain.CustomerCreditRowMapper"/>
|
||||
<bean class="org.springframework.batch.samples.domain.CustomerCreditRowMapper"/>
|
||||
</property>
|
||||
</bean>
|
||||
----
|
||||
|
||||
@@ -340,7 +340,7 @@ the following snippet in XML:
|
||||
</bean>
|
||||
|
||||
<bean id="player"
|
||||
class="org.springframework.batch.sample.domain.Player"
|
||||
class="org.springframework.batch.samples.domain.Player"
|
||||
scope="prototype" />
|
||||
----
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ The following bean definition shows how to prevent state persistence in XML:
|
||||
<bean id="playerSummarizationSource" class="org.spr...JdbcCursorItemReader">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="rowMapper">
|
||||
<bean class="org.springframework.batch.sample.PlayerSummaryMapper" />
|
||||
<bean class="org.springframework.batch.samples.PlayerSummaryMapper" />
|
||||
</property>
|
||||
<property name="saveState" value="false" />
|
||||
<property name="sql">
|
||||
|
||||
@@ -160,14 +160,14 @@ XML::
|
||||
The following example shows how to describe the alias in XML:
|
||||
+
|
||||
.XML Configuration
|
||||
[source, xml]
|
||||
[source,xml]
|
||||
----
|
||||
<bean id="tradeMarshaller"
|
||||
class="org.springframework.oxm.xstream.XStreamMarshaller">
|
||||
<property name="aliases">
|
||||
<util:map id="aliases">
|
||||
<entry key="trade"
|
||||
value="org.springframework.batch.sample.domain.trade.Trade" />
|
||||
value="org.springframework.batch.samples.domain.trade.Trade" />
|
||||
<entry key="price" value="java.math.BigDecimal" />
|
||||
<entry key="isin" value="java.lang.String" />
|
||||
<entry key="customer" value="java.lang.String" />
|
||||
@@ -196,7 +196,7 @@ StaxEventItemReader<Trade> xmlStaxEventItemReader = new StaxEventItemReader<>();
|
||||
Resource resource = new ByteArrayResource(xmlResource.getBytes());
|
||||
|
||||
Map aliases = new HashMap();
|
||||
aliases.put("trade","org.springframework.batch.sample.domain.trade.Trade");
|
||||
aliases.put("trade","org.springframework.batch.samples.domain.trade.Trade");
|
||||
aliases.put("price","java.math.BigDecimal");
|
||||
aliases.put("customer","java.lang.String");
|
||||
aliases.put("isin","java.lang.String");
|
||||
@@ -313,14 +313,14 @@ The following XML example uses the same marshaller as the one used in the readin
|
||||
shown earlier in the chapter:
|
||||
+
|
||||
.XML Configuration
|
||||
[source, xml]
|
||||
[source,xml]
|
||||
----
|
||||
<bean id="customerCreditMarshaller"
|
||||
class="org.springframework.oxm.xstream.XStreamMarshaller">
|
||||
<property name="aliases">
|
||||
<util:map id="aliases">
|
||||
<entry key="customer"
|
||||
value="org.springframework.batch.sample.domain.trade.Trade" />
|
||||
value="org.springframework.batch.samples.domain.trade.Trade" />
|
||||
<entry key="price" value="java.math.BigDecimal" />
|
||||
<entry key="isin" value="java.lang.String" />
|
||||
<entry key="customer" value="java.lang.String" />
|
||||
@@ -342,7 +342,7 @@ discussed, demonstrating the programmatic setup of the required properties:
|
||||
FileSystemResource resource = new FileSystemResource("data/outputFile.xml")
|
||||
|
||||
Map aliases = new HashMap();
|
||||
aliases.put("trade","org.springframework.batch.sample.domain.trade.Trade");
|
||||
aliases.put("trade","org.springframework.batch.samples.domain.trade.Trade");
|
||||
aliases.put("price","java.math.BigDecimal");
|
||||
aliases.put("customer","java.lang.String");
|
||||
aliases.put("isin","java.lang.String");
|
||||
|
||||
@@ -197,7 +197,7 @@ The following example shows how to reference the `tasklet` from the `step` in XM
|
||||
</job>
|
||||
|
||||
<beans:bean id="fileDeletingTasklet"
|
||||
class="org.springframework.batch.sample.tasklet.FileDeletingTasklet">
|
||||
class="org.springframework.batch.samples.tasklet.FileDeletingTasklet">
|
||||
<beans:property name="directoryResource">
|
||||
<beans:bean id="directory"
|
||||
class="org.springframework.core.io.FileSystemResource">
|
||||
|
||||
@@ -86,14 +86,14 @@ The purpose of this sample is to show to usage of the
|
||||
`JdbcCursorItemReader`/`JdbcPagingItemReader` and the `JdbcBatchItemWriter` to make
|
||||
efficient updates to a database table.
|
||||
|
||||
[Jdbc Readers and Batch Update sample](./src/main/java/org/springframework/batch/sample/jdbc/README.md)
|
||||
[Jdbc Readers and Batch Update sample](src/main/java/org/springframework/batch/samples/jdbc/README.md)
|
||||
|
||||
### JPA Readers and Writers sample
|
||||
|
||||
The purpose of this sample is to show to usage of the JPA item readers and writers
|
||||
to read and write data from/to a database with JPA and Hibernate.
|
||||
|
||||
[JPA Readers and Writers sample](./src/main/java/org/springframework/batch/sample/jpa/README.md)
|
||||
[JPA Readers and Writers sample](src/main/java/org/springframework/batch/samples/jpa/README.md)
|
||||
|
||||
### Amqp Job Sample
|
||||
|
||||
@@ -102,7 +102,7 @@ The `AmqpItemReader` and Writer were contributed by Chris Schaefer.
|
||||
It is modeled after the `JmsItemReader` / Writer implementations, which
|
||||
are popular models for remote chunking. It leverages the `AmqpTemplate`.
|
||||
|
||||
[Amqp Job Sample](src/main/java/org/springframework/batch/sample/amqp/README.md)
|
||||
[Amqp Job Sample](src/main/java/org/springframework/batch/samples/amqp/README.md)
|
||||
|
||||
### BeanWrapperMapper Sample
|
||||
|
||||
@@ -113,7 +113,7 @@ beans, and then their properties are set using the
|
||||
`BeanWrapperFieldSetMapper`, which sets properties of the
|
||||
prototype according to the field names in the file.
|
||||
|
||||
[BeanWrapperMapper Sample](./src/main/java/org/springframework/batch/sample/beanwrapper/README.md)
|
||||
[BeanWrapperMapper Sample](src/main/java/org/springframework/batch/samples/beanwrapper/README.md)
|
||||
|
||||
### Composite ItemWriter Sample
|
||||
|
||||
@@ -129,7 +129,7 @@ streams in the `Step` where they are used, in order for the step
|
||||
to be restartable. This is a common feature of all delegate
|
||||
patterns.
|
||||
|
||||
[Composite writer Sample](./src/main/java/org/springframework/batch/sample/compositewriter/README.md)
|
||||
[Composite writer Sample](src/main/java/org/springframework/batch/samples/compositewriter/README.md)
|
||||
|
||||
### Customer Filter Sample
|
||||
|
||||
@@ -137,7 +137,7 @@ This shows the use of the `ItemProcessor` to filter out items by
|
||||
returning null. When an item is filtered it leads to an increment
|
||||
in the `filterCount` in the step execution.
|
||||
|
||||
[Customer Filter Sample](./src/main/java/org/springframework/batch/sample/filter/README.md)
|
||||
[Customer Filter Sample](src/main/java/org/springframework/batch/samples/filter/README.md)
|
||||
|
||||
### Reader Writer Adapter Sample
|
||||
|
||||
@@ -145,35 +145,35 @@ This sample shows the delegate pattern, and also the
|
||||
`ItemReaderAdapter` which is used to adapt a POJO to the
|
||||
`ItemReader` interface.
|
||||
|
||||
[Reader Writer Adapter Sample](src/main/java/org/springframework/batch/sample/adapter/readerwriter/README.md)
|
||||
[Reader Writer Adapter Sample](src/main/java/org/springframework/batch/samples/adapter/readerwriter/README.md)
|
||||
|
||||
### Tasklet Adapter Sample
|
||||
|
||||
This sample shows the delegate pattern again, to adapt an
|
||||
existing service to a `Tasklet`.
|
||||
|
||||
[Tasklet Adapter Sample](src/main/java/org/springframework/batch/sample/adapter/tasklet/README.md)
|
||||
[Tasklet Adapter Sample](src/main/java/org/springframework/batch/samples/adapter/tasklet/README.md)
|
||||
|
||||
### Delimited File Import Job
|
||||
|
||||
The goal is to demonstrate a typical scenario of reading data
|
||||
from a delimited file, processing it and writing it to another file.
|
||||
|
||||
[Delimited file Job sample](./src/main/java/org/springframework/batch/sample/file/delimited/README.md)
|
||||
[Delimited file Job sample](src/main/java/org/springframework/batch/samples/file/delimited/README.md)
|
||||
|
||||
### Fixed Length Import Job
|
||||
|
||||
The goal is to demonstrate a typical scenario of reading data
|
||||
from a fixed length file, processing it and writing it to another file.
|
||||
|
||||
[Fixed Length Import Job sample](./src/main/java/org/springframework/batch/sample/file/fixed/README.md)
|
||||
[Fixed Length Import Job sample](src/main/java/org/springframework/batch/samples/file/fixed/README.md)
|
||||
|
||||
### XML Input Output
|
||||
|
||||
The goal here is to show the use of XML input and output through
|
||||
streaming and Spring OXM marshallers and unmarshallers.
|
||||
|
||||
[XML Input Output](./src/main/java/org/springframework/batch/sample/file/xml/README.md)
|
||||
[XML Input Output](src/main/java/org/springframework/batch/samples/file/xml/README.md)
|
||||
|
||||
### JSON Input Output
|
||||
|
||||
@@ -187,14 +187,14 @@ The goal of this sample is to show how to read and write JSON files:
|
||||
]
|
||||
```
|
||||
|
||||
[JSON Input Output](./src/main/java/org/springframework/batch/sample/file/json/README.md)
|
||||
[JSON Input Output](src/main/java/org/springframework/batch/samples/file/json/README.md)
|
||||
|
||||
### MultiResource Input Output Job
|
||||
|
||||
This sample shows how to use the `MultiResourceItemReader` and `MultiResourceItemWriter`
|
||||
to read and write multiple files in the same step.
|
||||
|
||||
[MultiResource Input Output Job Sample](./src/main/java/org/springframework/batch/sample/file/multiresource/README.md)
|
||||
[MultiResource Input Output Job Sample](src/main/java/org/springframework/batch/samples/file/multiresource/README.md)
|
||||
|
||||
### MultiLine Input Job
|
||||
|
||||
@@ -213,7 +213,7 @@ END
|
||||
...
|
||||
```
|
||||
|
||||
[MultiLine Input Job Sample](./src/main/java/org/springframework/batch/sample/file/multiline/README.md)
|
||||
[MultiLine Input Job Sample](src/main/java/org/springframework/batch/samples/file/multiline/README.md)
|
||||
|
||||
### MultiRecord type Input Job
|
||||
|
||||
@@ -236,7 +236,7 @@ TRADUK21341EAH50234 32.45customer6
|
||||
...
|
||||
```
|
||||
|
||||
[MultiRecord type Input Job Sample](./src/main/java/org/springframework/batch/sample/file/multirecordtype/README.md)
|
||||
[MultiRecord type Input Job Sample](src/main/java/org/springframework/batch/samples/file/multirecordtype/README.md)
|
||||
|
||||
### Multiline Aggregate Sample
|
||||
|
||||
@@ -261,7 +261,7 @@ END
|
||||
The goal of the job is to operate on the two groups, so the item
|
||||
type is naturally `List<Trade`>.
|
||||
|
||||
[Multiline Aggregate Sample](./src/main/java/org/springframework/batch/sample/file/multilineaggregate/README.md)
|
||||
[Multiline Aggregate Sample](src/main/java/org/springframework/batch/samples/file/multilineaggregate/README.md)
|
||||
|
||||
### Pattern Matching Sample
|
||||
|
||||
@@ -294,14 +294,14 @@ SIN;FEDX;AMS;
|
||||
FOT;5;36;14043.74
|
||||
```
|
||||
|
||||
[Pattern Matching Sample](./src/main/java/org/springframework/batch/sample/file/patternmatching/README.md)
|
||||
[Pattern Matching Sample](src/main/java/org/springframework/batch/samples/file/patternmatching/README.md)
|
||||
|
||||
### Football Job
|
||||
|
||||
This is a (American) Football statistics loading job. It loads two files containing players and games
|
||||
data into a database, and then combines them to summarise how each player performed for a particular year.
|
||||
|
||||
[Football Job](./src/main/java/org/springframework/batch/sample/football/README.md)
|
||||
[Football Job](src/main/java/org/springframework/batch/samples/football/README.md)
|
||||
|
||||
### Trade Job
|
||||
|
||||
@@ -313,7 +313,7 @@ file to database. Second, the trades are read from the database and
|
||||
credit on customer accounts is decreased appropriately. Last, a
|
||||
report about customers is exported to a file.
|
||||
|
||||
[Trade Job](./src/main/java/org/springframework/batch/sample/trade/README.md)
|
||||
[Trade Job](src/main/java/org/springframework/batch/samples/trade/README.md)
|
||||
|
||||
### Header Footer Sample
|
||||
|
||||
@@ -325,7 +325,7 @@ input to the output.
|
||||
* `SummaryFooterCallback`: creates a summary footer at the end
|
||||
of the output file.
|
||||
|
||||
[Header Footer Sample](./src/main/java/org/springframework/batch/sample/headerfooter/README.md)
|
||||
[Header Footer Sample](src/main/java/org/springframework/batch/samples/headerfooter/README.md)
|
||||
|
||||
### Hibernate Sample
|
||||
|
||||
@@ -349,7 +349,7 @@ This sample has a single step that is an infinite loop, reading and
|
||||
writing fake data. It is used to demonstrate stop signals and
|
||||
restart capabilities.
|
||||
|
||||
[Stop / Restart Sample](src/main/java/org/springframework/batch/sample/restart/stop/README.md)
|
||||
[Stop / Restart Sample](src/main/java/org/springframework/batch/samples/restart/stop/README.md)
|
||||
|
||||
### Fail Restart Sample
|
||||
|
||||
@@ -363,14 +363,14 @@ that counts how many records it has processed and throws a planned
|
||||
exception in a specified place. Since we re-use the same instance
|
||||
when we restart the job it will not fail the second time.
|
||||
|
||||
[Fail / Restart Sample](src/main/java/org/springframework/batch/sample/restart/fail/README.md)
|
||||
[Fail / Restart Sample](src/main/java/org/springframework/batch/samples/restart/fail/README.md)
|
||||
|
||||
### Loop Flow Sample
|
||||
|
||||
Shows how to implement a job that repeats one of its steps up to a
|
||||
limit set by a `JobExecutionDecider`.
|
||||
|
||||
[Loop Flow Sample](src/main/java/org/springframework/batch/sample/loop/README.md)
|
||||
[Loop Flow Sample](src/main/java/org/springframework/batch/samples/loop/README.md)
|
||||
|
||||
### Process Indicator pattern Sample
|
||||
|
||||
@@ -381,7 +381,7 @@ The job reads data from the same file as the [Fixed Length Import sample](#fixed
|
||||
writing it out directly it goes through a staging table, and the
|
||||
staging table is read in a multi-threaded step.
|
||||
|
||||
[Process Indicator pattern Sample](src/main/java/org/springframework/batch/sample/processindicator/README.md)
|
||||
[Process Indicator pattern Sample](src/main/java/org/springframework/batch/samples/processindicator/README.md)
|
||||
|
||||
### Local Partitioning Sample
|
||||
|
||||
@@ -430,7 +430,7 @@ and Spring Integration channels and messages are sent over the wire through a TC
|
||||
The goal is to demonstrate how to schedule job execution using
|
||||
Quartz scheduler.
|
||||
|
||||
[Quartz Sample](src/main/java/org/springframework/batch/sample/misc/quartz/README.md)
|
||||
[Quartz Sample](src/main/java/org/springframework/batch/samples/misc/quartz/README.md)
|
||||
|
||||
### Retry Sample
|
||||
|
||||
@@ -505,7 +505,7 @@ know which item caused the issue. Hence, it will "scan" the chunk item by item
|
||||
and only the faulty item will be skipped. Technically, the commit-interval will
|
||||
be re-set to 1 and each item will re-processed/re-written in its own transaction.
|
||||
|
||||
The `org.springframework.batch.sample.skip.SkippableExceptionDuringWriteSample` sample
|
||||
The `org.springframework.batch.samples.skip.SkippableExceptionDuringWriteSample` sample
|
||||
illustrates this behaviour:
|
||||
|
||||
* It reads numbers from 1 to 6 in chunks of 3 items, so two chunks are created: [1, 2 ,3] and [4, 5, 6]
|
||||
@@ -560,8 +560,8 @@ the datasource is exhausted and the step ends here
|
||||
|
||||
Similar examples show the expected behaviour when a skippable exception is thrown
|
||||
during reading and processing can be found in
|
||||
`org.springframework.batch.sample.skip.SkippableExceptionDuringReadSample`
|
||||
and `org.springframework.batch.sample.skip.SkippableExceptionDuringProcessSample`.
|
||||
`org.springframework.batch.samples.skip.SkippableExceptionDuringReadSample`
|
||||
and `org.springframework.batch.samples.skip.SkippableExceptionDuringProcessSample`.
|
||||
|
||||
### Tasklet Job
|
||||
|
||||
@@ -591,7 +591,7 @@ source view of the configuration is as follows:
|
||||
<bean id="deleteFilesInDir" parent="taskletStep">
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.tasklet.FileDeletingTasklet">
|
||||
class="org.springframework.batch.samples.tasklet.FileDeletingTasklet">
|
||||
<property name="directoryResource" ref="directory" />
|
||||
</bean>
|
||||
</property>
|
||||
@@ -599,7 +599,7 @@ source view of the configuration is as follows:
|
||||
<bean id="executeSystemCommand" parent="taskletStep">
|
||||
<property name="tasklet">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.common.SystemCommandTasklet">
|
||||
class="org.springframework.batch.samples.common.SystemCommandTasklet">
|
||||
<property name="command" value="echo hello" />
|
||||
<!-- 5 second timeout for the command to complete -->
|
||||
<property name="timeout" value="5000" />
|
||||
@@ -634,7 +634,7 @@ This sample requires [docker compose](https://docs.docker.com/compose/) to start
|
||||
To run the sample, please follow these steps:
|
||||
|
||||
```
|
||||
$>cd spring-batch-samples/src/main/resources/org/springframework/batch/sample/metrics
|
||||
$>cd spring-batch-samples/src/main/resources/org/springframework/batch/samples/metrics
|
||||
$>docker-compose up -d
|
||||
```
|
||||
|
||||
@@ -645,9 +645,9 @@ This should start the required monitoring stack:
|
||||
* Grafana on port `3000`
|
||||
|
||||
Once started, you need to [configure Prometheus as data source in Grafana](https://grafana.com/docs/features/datasources/prometheus/)
|
||||
and import the ready-to-use dashboard in `spring-batch-samples/src/main/resources/org/springframework/batch/sample/metrics/spring-batch-dashboard.json`.
|
||||
and import the ready-to-use dashboard in `spring-batch-samples/src/main/resources/org/springframework/batch/samples/metrics/spring-batch-dashboard.json`.
|
||||
|
||||
Finally, run the `org.springframework.batch.sample.metrics.BatchMetricsApplication`
|
||||
Finally, run the `org.springframework.batch.samples.metrics.BatchMetricsApplication`
|
||||
class without any argument to start the sample.
|
||||
|
||||
# MongoDB sample
|
||||
@@ -663,7 +663,7 @@ you can run the following command to start a MongoDB server:
|
||||
$>docker run --name mongodb --rm -d -p 27017:27017 mongo
|
||||
```
|
||||
|
||||
Once MongoDB is up and running, run the `org.springframework.batch.sample.mongodb.MongoDBSampleApp`
|
||||
Once MongoDB is up and running, run the `org.springframework.batch.samples.mongodb.MongoDBSampleApp`
|
||||
class without any argument to start the sample.
|
||||
|
||||
### Adhoc Loop and JMX Sample
|
||||
@@ -672,4 +672,4 @@ This job is simply an infinite loop. It runs forever so it is
|
||||
useful for testing features to do with stopping and starting jobs.
|
||||
It is used, for instance, as one of the jobs that can be run from JMX.
|
||||
|
||||
[Adhoc Loop and JMX Sample](src/main/java/org/springframework/batch/sample/misc/jmx/README.md)
|
||||
[Adhoc Loop and JMX Sample](src/main/java/org/springframework/batch/samples/misc/jmx/README.md)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.adapter.tasklet;
|
||||
package org.springframework.batch.samples.adapter.tasklet;
|
||||
|
||||
import org.springframework.batch.core.scope.context.ChunkContext;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.amqp;
|
||||
package org.springframework.batch.samples.amqp;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.amqp;
|
||||
package org.springframework.batch.samples.amqp;
|
||||
|
||||
import org.springframework.amqp.core.AmqpTemplate;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
@@ -35,7 +35,7 @@ public final class AmqpMessageProducer {
|
||||
private static final int SEND_MESSAGE_COUNT = 10;
|
||||
|
||||
private static final String[] BEAN_CONFIG = {
|
||||
"classpath:org/springframework/batch/sample/amqp/job/rabbitmq-beans.xml" };
|
||||
"classpath:org/springframework/batch/samples/amqp/job/rabbitmq-beans.xml" };
|
||||
|
||||
public static void main(String[] args) {
|
||||
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(BEAN_CONFIG);
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.amqp;
|
||||
package org.springframework.batch.samples.amqp;
|
||||
|
||||
import org.springframework.batch.item.ItemProcessor;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.chunking;
|
||||
package org.springframework.batch.samples.chunking;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.chunking;
|
||||
package org.springframework.batch.samples.chunking;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.springframework.integration.jms.dsl.Jms;
|
||||
@EnableBatchProcessing
|
||||
@EnableBatchIntegration
|
||||
@EnableIntegration
|
||||
@PropertySource("classpath:org/springframework/batch/sample/chunking/remote-chunking.properties")
|
||||
@PropertySource("classpath:org/springframework/batch/samples/chunking/remote-chunking.properties")
|
||||
@Import(DataSourceConfiguration.class)
|
||||
public class ManagerConfiguration {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.chunking;
|
||||
package org.springframework.batch.samples.chunking;
|
||||
|
||||
import jakarta.jms.JMSException;
|
||||
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
|
||||
@@ -50,7 +50,7 @@ import org.springframework.integration.jms.dsl.Jms;
|
||||
@EnableBatchProcessing
|
||||
@EnableBatchIntegration
|
||||
@EnableIntegration
|
||||
@PropertySource("classpath:org/springframework/batch/sample/chunking/remote-chunking.properties")
|
||||
@PropertySource("classpath:org/springframework/batch/samples/chunking/remote-chunking.properties")
|
||||
@Import(DataSourceConfiguration.class)
|
||||
public class WorkerConfiguration {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
public class OutputFileNameListener {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
/**
|
||||
* Item wrapper useful in "process indicator" usecase, where input is marked as processed
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -23,7 +23,7 @@ import org.springframework.batch.core.annotation.AfterStep;
|
||||
import org.springframework.batch.core.annotation.BeforeStep;
|
||||
import org.springframework.batch.core.annotation.OnSkipInProcess;
|
||||
import org.springframework.batch.core.annotation.OnSkipInWrite;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
|
||||
/**
|
||||
* @author Dan Garrette
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.common;
|
||||
package org.springframework.batch.samples.common;
|
||||
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.sample.misc.jmx.SimpleMessageApplicationEvent;
|
||||
import org.springframework.batch.samples.misc.jmx.SimpleMessageApplicationEvent;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.ApplicationEventPublisherAware;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.config;
|
||||
package org.springframework.batch.samples.config;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import javax.sql.DataSource;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.person;
|
||||
package org.springframework.batch.samples.domain.person;
|
||||
|
||||
public class Child {
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.person;
|
||||
package org.springframework.batch.samples.domain.person;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.sample.file.patternmatching.Address;
|
||||
import org.springframework.batch.samples.file.patternmatching.Address;
|
||||
|
||||
public class Person {
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.person;
|
||||
package org.springframework.batch.samples.domain.person;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.sample.file.patternmatching.Address;
|
||||
import org.springframework.batch.samples.file.patternmatching.Address;
|
||||
|
||||
/**
|
||||
* Custom class that contains logic that would normally be be contained in
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.person.internal;
|
||||
package org.springframework.batch.samples.domain.person.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.person.Person;
|
||||
import org.springframework.batch.samples.domain.person.Person;
|
||||
|
||||
public class PersonWriter implements ItemWriter<Person> {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.core.StepExecutionListener;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
/**
|
||||
* Interface for writing customer's credit information to output.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
/**
|
||||
* Interface for writing {@link CustomerDebitDao} object to arbitrary output.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import static org.springframework.batch.sample.domain.trade.CustomerOperation.*;
|
||||
import static org.springframework.batch.samples.domain.trade.CustomerOperation.*;
|
||||
|
||||
import org.springframework.batch.item.ItemProcessor;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
/**
|
||||
* Interface for logging invalid customers. Customers may need to be logged because they
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.samples.domain.trade;
|
||||
|
||||
/**
|
||||
* Interface for writing a Trade object to an arbitrary output.
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.batch.core.launch.support.CommandLineJobRunner;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerUpdate;
|
||||
import org.springframework.batch.sample.domain.trade.InvalidCustomerLogger;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerUpdate;
|
||||
import org.springframework.batch.samples.domain.trade.InvalidCustomerLogger;
|
||||
|
||||
/**
|
||||
* @author Lucas Ward
|
||||
@@ -33,7 +33,7 @@ public class CommonsLoggingInvalidCustomerLogger implements InvalidCustomerLogge
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.sample.domain.trade.InvalidCustomerLogger#log(org.
|
||||
* @see org.springframework.batch.samples.domain.trade.InvalidCustomerLogger#log(org.
|
||||
* springframework.batch.sample.domain.trade.CustomerUpdate)
|
||||
*/
|
||||
@Override
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.item.file.transform.FieldSet;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
|
||||
/**
|
||||
* @author Dan Garrette
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.springframework.batch.item.ItemProcessor;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCreditDao;
|
||||
|
||||
/**
|
||||
* Delegates actual writing to a custom DAO.
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
public class CustomerCreditRowMapper implements RowMapper<CustomerCredit> {
|
||||
@@ -13,14 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.item.database.ItemPreparedStatementSetter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCreditDao;
|
||||
|
||||
public class CustomerCreditUpdateWriter implements ItemWriter<CustomerCredit> {
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerDebit;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
public class CustomerDebitRowMapper implements RowMapper<CustomerDebit> {
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebitDao;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerDebitDao;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
|
||||
/**
|
||||
* Transforms Trade to a CustomerDebit and asks DAO delegate to write the result.
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemStream;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
|
||||
/**
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.hibernate.SessionFactory;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -22,8 +22,8 @@ import org.hibernate.SessionFactory;
|
||||
import org.springframework.batch.repeat.RepeatContext;
|
||||
import org.springframework.batch.repeat.RepeatListener;
|
||||
import org.springframework.batch.repeat.RepeatStatus;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCreditDao;
|
||||
|
||||
/**
|
||||
* @author Lucas Ward
|
||||
@@ -55,8 +55,8 @@ public class HibernateCreditDao implements CustomerCreditDao, RepeatListener {
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.springframework.batch.sample.domain.trade.internal.CustomerCreditWriter#write(
|
||||
* org.springframework.batch.sample.domain.CustomerCredit)
|
||||
* org.springframework.batch.samples.domain.trade.internal.CustomerCreditWriter#write(
|
||||
* org.springframework.batch.samples.domain.CustomerCredit)
|
||||
*/
|
||||
@Override
|
||||
public void writeCredit(CustomerCredit customerCredit) {
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -23,7 +23,7 @@ import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDao;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerDao;
|
||||
import org.springframework.jdbc.core.support.JdbcDaoSupport;
|
||||
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebitDao;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerDebitDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.TradeDao;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.TradeDao;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.item.file.transform.FieldSet;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
|
||||
public class TradeFieldSetMapper implements FieldSetMapper<Trade> {
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.ItemProcessor;
|
||||
import org.springframework.batch.item.validator.ValidationException;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
public class TradeRowMapper implements RowMapper<Trade> {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
package org.springframework.batch.samples.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
@@ -28,8 +28,8 @@ import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemStreamSupport;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.item.WriteFailedException;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.TradeDao;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.TradeDao;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -13,11 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade.internal.validator;
|
||||
package org.springframework.batch.samples.domain.trade.internal.validator;
|
||||
|
||||
import org.springframework.validation.Errors;
|
||||
import org.springframework.validation.Validator;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
|
||||
/**
|
||||
* @author Michael Minella
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.file.delimited;
|
||||
package org.springframework.batch.samples.file.delimited;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -14,8 +14,8 @@ import org.springframework.batch.item.file.FlatFileItemReader;
|
||||
import org.springframework.batch.item.file.FlatFileItemWriter;
|
||||
import org.springframework.batch.item.file.builder.FlatFileItemReaderBuilder;
|
||||
import org.springframework.batch.item.file.builder.FlatFileItemWriterBuilder;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.internal.CustomerCreditIncreaseProcessor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.file.fixed;
|
||||
package org.springframework.batch.samples.file.fixed;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -15,8 +15,8 @@ import org.springframework.batch.item.file.FlatFileItemWriter;
|
||||
import org.springframework.batch.item.file.builder.FlatFileItemReaderBuilder;
|
||||
import org.springframework.batch.item.file.builder.FlatFileItemWriterBuilder;
|
||||
import org.springframework.batch.item.file.transform.Range;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.internal.CustomerCreditIncreaseProcessor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -7,7 +7,7 @@ from a fixed length file, processing it and writing it to another file.
|
||||
|
||||
In this example we are using a simple fixed length record structure
|
||||
that can be found in the project at
|
||||
`src/main/resources/org/springframework/batch/sample/file/fixed/data`.
|
||||
`src/main/resources/org/springframework/batch/samples/file/fixed/data`.
|
||||
The fixed length records look like this:
|
||||
|
||||
```
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.file.json;
|
||||
package org.springframework.batch.samples.file.json;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.batch.item.json.JsonFileItemWriter;
|
||||
import org.springframework.batch.item.json.JsonItemReader;
|
||||
import org.springframework.batch.item.json.builder.JsonFileItemWriterBuilder;
|
||||
import org.springframework.batch.item.json.builder.JsonItemReaderBuilder;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.file.multiline;
|
||||
package org.springframework.batch.samples.file.multiline;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.multiline;
|
||||
package org.springframework.batch.samples.file.multiline;
|
||||
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.multiline;
|
||||
package org.springframework.batch.samples.file.multiline;
|
||||
|
||||
import org.springframework.batch.item.Chunk;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.multiline;
|
||||
package org.springframework.batch.samples.file.multiline;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.file.multilineaggregate;
|
||||
package org.springframework.batch.samples.file.multilineaggregate;
|
||||
|
||||
/**
|
||||
* A wrapper type for an item that is used by {@link AggregateItemReader} to identify the
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.file.multilineaggregate;
|
||||
package org.springframework.batch.samples.file.multilineaggregate;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.item.file.transform.FieldSet;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.multilineaggregate;
|
||||
package org.springframework.batch.samples.file.multilineaggregate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.multirecordtype;
|
||||
package org.springframework.batch.samples.file.multirecordtype;
|
||||
|
||||
import org.springframework.batch.item.file.transform.LineAggregator;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
|
||||
/**
|
||||
* @author Dan Garrette
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.file.multirecordtype;
|
||||
package org.springframework.batch.samples.file.multirecordtype;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -34,10 +34,10 @@ import org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor;
|
||||
import org.springframework.batch.item.file.transform.FixedLengthTokenizer;
|
||||
import org.springframework.batch.item.file.transform.FormatterLineAggregator;
|
||||
import org.springframework.batch.item.file.transform.Range;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.Trade;
|
||||
import org.springframework.batch.samples.domain.trade.internal.CustomerCreditFieldSetMapper;
|
||||
import org.springframework.batch.samples.domain.trade.internal.TradeFieldSetMapper;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.file.multiresource;
|
||||
package org.springframework.batch.samples.file.multiresource;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -33,8 +33,8 @@ import org.springframework.batch.item.file.builder.FlatFileItemReaderBuilder;
|
||||
import org.springframework.batch.item.file.builder.FlatFileItemWriterBuilder;
|
||||
import org.springframework.batch.item.file.builder.MultiResourceItemReaderBuilder;
|
||||
import org.springframework.batch.item.file.builder.MultiResourceItemWriterBuilder;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor;
|
||||
import org.springframework.batch.samples.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.samples.domain.trade.internal.CustomerCreditIncreaseProcessor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.patternmatching;
|
||||
package org.springframework.batch.samples.file.patternmatching;
|
||||
|
||||
public class Address {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.patternmatching;
|
||||
package org.springframework.batch.samples.file.patternmatching;
|
||||
|
||||
public class BillingInfo {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.patternmatching;
|
||||
package org.springframework.batch.samples.file.patternmatching;
|
||||
|
||||
public class Customer {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.patternmatching;
|
||||
package org.springframework.batch.samples.file.patternmatching;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.file.patternmatching;
|
||||
package org.springframework.batch.samples.file.patternmatching;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user