diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderTargetSource.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderTargetSource.java index 04e6ac19d..946d0da8b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderTargetSource.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderTargetSource.java @@ -30,6 +30,8 @@ import org.springframework.beans.PropertyEditorRegistrySupport; import org.springframework.beans.TypeConverter; import org.springframework.beans.TypeMismatchException; import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.config.BeanDefinitionVisitor; import org.springframework.beans.factory.config.TypedStringValue; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -266,7 +268,7 @@ public class PlaceholderTargetSource extends SimpleBeanTargetSource implements I private Object getPropertyFromContext(String key) { Object context = contextFactory.getContext(); - if (context==null) { + if (context == null) { throw new IllegalStateException("No context available while replacing placeholders."); } BeanWrapper wrapper = new BeanWrapperImpl(context); @@ -334,30 +336,47 @@ public class PlaceholderTargetSource extends SimpleBeanTargetSource implements I } } - } else if (value instanceof Map) { - + } + else if (value instanceof Map) { + Map map = (Map) value; Map newValue = new ManagedMap(map.size()); newValue.putAll(map); super.visitMap(newValue); value = newValue; - - } else if (value instanceof List) { - + + } + else if (value instanceof List) { + List list = (List) value; List newValue = new ManagedList(list.size()); newValue.addAll(list); super.visitList(newValue); value = newValue; - - } else if (value instanceof Set) { - + + } + else if (value instanceof Set) { + Set list = (Set) value; Set newValue = new ManagedSet(list.size()); newValue.addAll(list); super.visitSet(newValue); value = newValue; - + + } + else if (value instanceof BeanDefinition) { + + BeanDefinition newValue = new GenericBeanDefinition((BeanDefinition) value); + visitBeanDefinition((BeanDefinition) newValue); + value = newValue; + + } + else if (value instanceof BeanDefinitionHolder) { + + BeanDefinition newValue = new GenericBeanDefinition(((BeanDefinitionHolder) value).getBeanDefinition()); + visitBeanDefinition((BeanDefinition) newValue); + value = newValue; + } else { diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandlerTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandlerTests.java index 390799084..b141cc8f6 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandlerTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandlerTests.java @@ -7,6 +7,7 @@ import static org.junit.Assert.fail; import java.util.Collection; import java.util.HashSet; import java.util.Set; +import java.util.TreeSet; import org.junit.Before; import org.junit.Test; @@ -26,6 +27,8 @@ public class TaskExecutorPartitionHandlerTests { private TaskExecutorPartitionHandler handler = new TaskExecutorPartitionHandler(); private int count = 0; + + private Collection stepExecutions = new TreeSet(); private StepExecution stepExecution = new StepExecution("step", new JobExecution(1L)); @@ -50,6 +53,7 @@ public class TaskExecutorPartitionHandlerTests { @Override public void execute(StepExecution stepExecution) throws JobInterruptedException { count++; + stepExecutions.add(stepExecution.getStepName()); } }); handler.afterPropertiesSet(); @@ -74,6 +78,7 @@ public class TaskExecutorPartitionHandlerTests { handler.setGridSize(2); handler.handle(stepExecutionSplitter, stepExecution); assertEquals(2, count); + assertEquals("[foo0, foo1]", stepExecutions.toString()); } @Test diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests.java index dc9f669b5..0bc9d18ee 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests.java @@ -61,6 +61,10 @@ public class MultipleContextPlaceholderTargetSourceTests { @Qualifier("list") private TestBean list; + @Autowired + @Qualifier("nestedList") + private TestBean nestedList; + @Autowired @Qualifier("map") private TestBean map; @@ -120,6 +124,23 @@ public class MultipleContextPlaceholderTargetSourceTests { } + @Test + public void testMultipleValueInNestedList() throws Exception { + + for (int i = 0; i < 4; i++) { + final String value = "foo" + i; + contextFactory.setContext(this); + attributes = Collections.singletonMap("foo", value); + try { + assertEquals("foo" + i, nestedList.getParent().getNames().get(0)); + } + finally { + contextFactory.clearContext(); + } + } + + } + @Test public void testMultipleValueInMap() throws Exception { @@ -144,10 +165,20 @@ public class MultipleContextPlaceholderTargetSourceTests { public static class TestBean { private String name; + + private TestBean parent; private List names = new ArrayList(); private Map map = new HashMap(); + + public TestBean getParent() { + return parent; + } + + public void setParent(TestBean parent) { + this.parent = parent; + } public String getName() { return name; diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests-context.xml index 672f3c01d..1ba169b04 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/scope/util/MultipleContextPlaceholderTargetSourceTests-context.xml @@ -36,6 +36,16 @@ + + + + + + + + + - %{attributes[foo]} + %{attributes[foo]} + + + + + + + + + + %{attributes[foo]} + + + diff --git a/spring-batch-samples/.springBeans b/spring-batch-samples/.springBeans index 47aea6566..2a7d109fb 100644 --- a/spring-batch-samples/.springBeans +++ b/spring-batch-samples/.springBeans @@ -1,7 +1,7 @@ 1 - + @@ -60,13 +60,11 @@ src/test/resources/org/springframework/batch/sample/MultilineJobFunctionalTests-context.xml src/test/resources/org/springframework/batch/sample/MultilineOrderJobFunctionalTests-context.xml src/test/resources/org/springframework/batch/sample/ParallelJobFunctionalTests-context.xml - src/main/resources/jobs/partitionJob.xml src/test/resources/org/springframework/batch/sample/RestartFunctionalTests-context.xml src/test/resources/org/springframework/batch/sample/RetrySampleFunctionalTests-context.xml src/test/resources/org/springframework/batch/sample/common/StagingItemReaderTests-context.xml src/test/resources/org/springframework/batch/sample/common/StagingItemWriterTests-context.xml src/test/resources/org/springframework/batch/sample/TradeJobFunctionalTests-context.xml - src/test/resources/org/springframework/batch/sample/PartitionJobFunctionalTests-context.xml src/main/resources/jobs/multilineOrderValidator.xml src/main/resources/jobs/restartFileSampleJob.xml src/main/resources/jobs/taskletJob.xml @@ -75,6 +73,7 @@ src/main/resources/jobs/iosample/jdbcPaging.xml src/test/resources/org/springframework/batch/sample/GroovyJobFunctionalTests-context.xml src/test/resources/org/springframework/batch/sample/TaskletJobFunctionalTests-context.xml + src/main/resources/jobs/partitionJdbcJob.xml @@ -395,7 +394,6 @@ false src/main/resources/data-source-context.xml - src/main/resources/jobs/partitionJob.xml src/main/resources/simple-job-launcher-context.xml diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/ColumnRangePartitioner.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/ColumnRangePartitioner.java new file mode 100644 index 000000000..283b37071 --- /dev/null +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/ColumnRangePartitioner.java @@ -0,0 +1,93 @@ +package org.springframework.batch.sample.common; + +import java.util.HashMap; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.batch.core.partition.support.Partitioner; +import org.springframework.batch.item.ExecutionContext; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + +/** + * Simple minded partitioner for a range of values of a column in a database + * table. Works best if the values are uniformly distributed (e.g. + * auto-generated primary key values). + * + * @author Dave Syer + * + */ +public class ColumnRangePartitioner implements Partitioner { + + private SimpleJdbcTemplate jdbcTemplate; + + private String table; + + private String column; + + /** + * The name of the SQL table the data are in. + * + * @param table the name of the table + */ + public void setTable(String table) { + this.table = table; + } + + /** + * The name of the column to partition. + * + * @param column the column name. + */ + public void setColumn(String column) { + this.column = column; + } + + /** + * The data source for connecting to the database. + * + * @param dataSource a {@link DataSource} + */ + public void setDataSource(DataSource dataSource) { + jdbcTemplate = new SimpleJdbcTemplate(dataSource); + } + + /** + * Partition a database table assuming that the data in the column specified + * are uniformly distributed. The execution context values will have keys + * minValue and maxValue specifying the range of + * values to consider in each partition. + * + * @see Partitioner#partition(int) + */ + public Map partition(int gridSize) { + + int min = jdbcTemplate.queryForInt("SELECT MIN(" + column + ") from " + table); + int max = jdbcTemplate.queryForInt("SELECT MAX(" + column + ") from " + table); + int targetSize = (max - min) / gridSize + 1; + + Map result = new HashMap(); + int number = 0; + int start = min; + int end = start + targetSize - 1; + + while (start <= max) { + + ExecutionContext value = new ExecutionContext(); + result.put("partition" + number, value); + + if (end >= max) { + end = max; + } + value.putInt("minValue", start); + value.putInt("maxValue", end); + start += targetSize; + end += targetSize; + number++; + } + + return result; + + } + +} diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java index a04e154cf..ab400c74a 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/OutputFileListener.java @@ -30,6 +30,12 @@ public class OutputFileListener { private String inputKeyName = "fileName"; + private String path = "file:./target/output/"; + + public void setPath(String path) { + this.path = path; + } + public void setOutputKeyName(String outputKeyName) { this.outputKeyName = outputKeyName; } @@ -39,11 +45,15 @@ public class OutputFileListener { } @BeforeStep - public void CreateOutputNameFromInput(StepExecution stepExecution) { + public void createOutputNameFromInput(StepExecution stepExecution) { ExecutionContext executionContext = stepExecution.getExecutionContext(); - if (executionContext.containsKey(inputKeyName) && !executionContext.containsKey(outputKeyName)) { - String inputName = executionContext.getString(inputKeyName); - executionContext.putString(outputKeyName, "file:./target/output/" + FilenameUtils.getBaseName(inputName) + ".csv"); + String inputName = stepExecution.getStepName().replace(":", "-"); + if (executionContext.containsKey(inputKeyName)) { + inputName = executionContext.getString(inputKeyName); + } + if (!executionContext.containsKey(outputKeyName)) { + executionContext.putString(outputKeyName, path + FilenameUtils.getBaseName(inputName) + + ".csv"); } } diff --git a/spring-batch-samples/src/main/resources/jobs/partitionJob.xml b/spring-batch-samples/src/main/resources/jobs/partitionFileJob.xml similarity index 94% rename from spring-batch-samples/src/main/resources/jobs/partitionJob.xml rename to spring-batch-samples/src/main/resources/jobs/partitionFileJob.xml index 2a827599f..eab171ee4 100644 --- a/spring-batch-samples/src/main/resources/jobs/partitionJob.xml +++ b/spring-batch-samples/src/main/resources/jobs/partitionFileJob.xml @@ -29,6 +29,7 @@ + @@ -42,7 +43,10 @@ - + + + + @@ -54,7 +58,7 @@ - + diff --git a/spring-batch-samples/src/main/resources/jobs/partitionJdbcJob.xml b/spring-batch-samples/src/main/resources/jobs/partitionJdbcJob.xml new file mode 100644 index 000000000..764b1dd6b --- /dev/null +++ b/spring-batch-samples/src/main/resources/jobs/partitionJdbcJob.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = ? and ID <= ? + ]]> + + + + + + + #{stepExecutionContext[minValue]} + #{stepExecutionContext[maxValue]} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java new file mode 100644 index 000000000..be836e103 --- /dev/null +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java @@ -0,0 +1,118 @@ +/* + * Copyright 2006-2007 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.batch.sample; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.batch.core.BatchStatus; +import org.springframework.batch.core.JobExecution; +import org.springframework.batch.item.ExecutionContext; +import org.springframework.batch.item.ItemReader; +import org.springframework.batch.item.ItemStream; +import org.springframework.batch.sample.domain.trade.CustomerCredit; +import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor; +import org.springframework.batch.test.AbstractJobTests; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration() +public class PartitionFileJobFunctionalTests extends AbstractJobTests { + + @Autowired + @Qualifier("inputTestReader") + private ItemReader inputReader; + + @Autowired + @Qualifier("outputTestReader") + private ItemReader outputReader; + + /** + * Check the resulting credits correspond to inputs increased by fixed + * amount. + */ + @Test + public void testUpdateCredit() throws Exception { + + assertTrue("Define a prototype bean called 'outputTestReader' to check the output", getApplicationContext() + .containsBeanDefinition("outputTestReader")); + + open(inputReader); + List inputs = new ArrayList(getCredits(inputReader)); + close(inputReader); + + JobExecution jobExecution = this.launchJob(); + assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus()); + + open(outputReader); + List outputs = new ArrayList(getCredits(outputReader)); + close(outputReader); + + assertEquals(inputs.size(), outputs.size()); + int itemCount = inputs.size(); + assertTrue(itemCount > 0); + + inputs.iterator(); + for (int i = 0; i < itemCount; i++) { + assertEquals(inputs.get(i).getCredit().add(CustomerCreditIncreaseProcessor.FIXED_AMOUNT).intValue(), + outputs.get(i).getCredit().intValue()); + } + + } + + /** + * Read all credits using the provided reader. + */ + private Set getCredits(ItemReader reader) throws Exception { + CustomerCredit credit; + Set result = new LinkedHashSet(); + while ((credit = reader.read()) != null) { + result.add(credit); + } + return result; + + } + + /** + * Open the reader if applicable. + */ + private void open(ItemReader reader) { + if (reader instanceof ItemStream) { + ((ItemStream) reader).open(new ExecutionContext()); + } + } + + /** + * Close the reader if applicable. + */ + private void close(ItemReader reader) { + if (reader instanceof ItemStream) { + ((ItemStream) reader).close(); + } + } + +} diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests.java similarity index 84% rename from spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJobFunctionalTests.java rename to spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests.java index dec80d69a..a6a1b576b 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJobFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests.java @@ -20,7 +20,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import org.junit.Test; import org.junit.runner.RunWith; @@ -39,12 +41,16 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration() -public class PartitionJobFunctionalTests extends AbstractJobTests { +public class PartitionJdbcJobFunctionalTests extends AbstractJobTests { @Autowired @Qualifier("inputTestReader") private ItemReader inputReader; + @Autowired + @Qualifier("outputTestReader") + private ItemReader outputReader; + /** * Check the resulting credits correspond to inputs increased by fixed * amount. @@ -56,23 +62,21 @@ public class PartitionJobFunctionalTests extends AbstractJobTests { .containsBeanDefinition("outputTestReader")); open(inputReader); - List inputs = getCredits(inputReader); + List inputs = new ArrayList(getCredits(inputReader)); close(inputReader); JobExecution jobExecution = this.launchJob(); assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus()); - @SuppressWarnings("unchecked") - ItemReader outputReader = (ItemReader) getApplicationContext().getBean( - "outputTestReader"); open(outputReader); - List outputs = getCredits(outputReader); + List outputs = new ArrayList(getCredits(outputReader)); close(outputReader); assertEquals(inputs.size(), outputs.size()); int itemCount = inputs.size(); assertTrue(itemCount > 0); + inputs.iterator(); for (int i = 0; i < itemCount; i++) { assertEquals(inputs.get(i).getCredit().add(CustomerCreditIncreaseProcessor.FIXED_AMOUNT).intValue(), outputs.get(i).getCredit().intValue()); @@ -83,9 +87,9 @@ public class PartitionJobFunctionalTests extends AbstractJobTests { /** * Read all credits using the provided reader. */ - private List getCredits(ItemReader reader) throws Exception { + private Set getCredits(ItemReader reader) throws Exception { CustomerCredit credit; - List result = new ArrayList(); + Set result = new LinkedHashSet(); while ((credit = reader.read()) != null) { result.add(credit); } diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/ColumnRangePartitionerTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/ColumnRangePartitionerTests.java new file mode 100644 index 000000000..7cb7ceb4c --- /dev/null +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/ColumnRangePartitionerTests.java @@ -0,0 +1,38 @@ +package org.springframework.batch.sample.common; + +import static org.junit.Assert.assertEquals; + +import java.util.Map; + +import javax.sql.DataSource; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.batch.item.ExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration +public class ColumnRangePartitionerTests { + + private DataSource dataSource; + + @Autowired + public void setDataSource(DataSource dataSource) { + this.dataSource = dataSource; + } + + private ColumnRangePartitioner partitioner = new ColumnRangePartitioner(); + + @Test + public void testPartition() { + partitioner.setDataSource(dataSource); + partitioner.setTable("CUSTOMER"); + partitioner.setColumn("ID"); + Map partition = partitioner.partition(2); + assertEquals(2, partition.size()); + } + +} diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/OutputFileListenerTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/OutputFileListenerTests.java new file mode 100644 index 000000000..17b0869c3 --- /dev/null +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/common/OutputFileListenerTests.java @@ -0,0 +1,44 @@ +package org.springframework.batch.sample.common; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.springframework.batch.core.JobExecution; +import org.springframework.batch.core.StepExecution; + +public class OutputFileListenerTests { + + private OutputFileListener listener = new OutputFileListener(); + private StepExecution stepExecution = new StepExecution("foo", new JobExecution(0L), 1L); + + @Test + public void testCreateOutputNameFromInput() { + listener.createOutputNameFromInput(stepExecution); + assertEquals("{outputFile=file:./target/output/foo.csv}", stepExecution.getExecutionContext().toString()); + } + + @Test + public void testSetPath() { + listener.setPath("spam/"); + listener.createOutputNameFromInput(stepExecution); + assertEquals("{outputFile=spam/foo.csv}", stepExecution.getExecutionContext().toString()); + } + + @Test + public void testSetOutputKeyName() { + listener.setPath(""); + listener.setOutputKeyName("spam"); + listener.createOutputNameFromInput(stepExecution); + assertEquals("{spam=foo.csv}", stepExecution.getExecutionContext().toString()); + } + + @Test + public void testSetInputKeyName() { + listener.setPath(""); + listener.setInputKeyName("spam"); + stepExecution.getExecutionContext().putString("spam", "bar"); + listener.createOutputNameFromInput(stepExecution); + assertEquals("{outputFile=bar.csv, spam=bar}", stepExecution.getExecutionContext().toString()); + } + +} diff --git a/spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionJobFunctionalTests-context.xml b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionFileJobFunctionalTests-context.xml similarity index 85% rename from spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionJobFunctionalTests-context.xml rename to spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionFileJobFunctionalTests-context.xml index 44dbf80b8..78a964a52 100644 --- a/spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionJobFunctionalTests-context.xml +++ b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionFileJobFunctionalTests-context.xml @@ -5,6 +5,6 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + diff --git a/spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests-context.xml b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests-context.xml new file mode 100644 index 000000000..d53fbabc6 --- /dev/null +++ b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests-context.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/spring-batch-samples/src/test/resources/org/springframework/batch/sample/common/ColumnRangePartitionerTests-context.xml b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/common/ColumnRangePartitionerTests-context.xml new file mode 100644 index 000000000..50fdfefc1 --- /dev/null +++ b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/common/ColumnRangePartitionerTests-context.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file