RESLOVED - BATCH-346: CommandLineJobRunner now requires just single xml file argument, samples modified to use import statement (and removed parent context loading from test launcher)

This commit is contained in:
robokaso
2008-02-29 08:54:09 +00:00
parent a2135adbba
commit ac1f86b1a5
23 changed files with 71 additions and 56 deletions

View File

@@ -8,7 +8,9 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<import resource="../simple-container-definition.xml" />
<bean parent="stepScope" />
<bean parent="jobConfigurationRegistryBeanPostProcessor" />
@@ -49,15 +51,14 @@
<bean id="fileInputTemplate"
class="org.springframework.batch.io.file.FlatFileItemReader">
<property name="resource" ref="fileLocator" />
<property name="resource" value="classpath:data/beanWrapperMapperSampleJob/input/20070122.teststream.ImportTradeDataStep.txt" />
<property name="lineTokenizer" ref="fixedFileDescriptor" />
<property name="fieldSetMapper" ref="fieldSetMapper" />
</bean>
<bean id="fileInputTemplate2"
class="org.springframework.batch.io.file.FlatFileItemReader"
scope="step">
<property name="resource" ref="fileLocator2" />
class="org.springframework.batch.io.file.FlatFileItemReader">
<property name="resource" value="classpath:data/beanWrapperMapperSampleJob/input/20070122.teststream.ImportPersonDataStep.txt" />
<property name="lineTokenizer" ref="fixedFileDescriptor2" />
<property name="fieldSetMapper" ref="fieldSetMapper2" />
<!-- <property name="validator" ref="fixedValidator" />-->
@@ -103,20 +104,6 @@
</property>
</bean>
<bean id="fileLocator"
class="org.springframework.core.io.ClassPathResource">
<constructor-arg type="java.lang.String"
value="data/beanWrapperMapperSampleJob/input/20070122.teststream.ImportTradeDataStep.txt" />
</bean>
<bean id="fileLocator2"
class="org.springframework.core.io.ClassPathResource">
<constructor-arg type="java.lang.String"
value="data/beanWrapperMapperSampleJob/input/20070122.teststream.ImportPersonDataStep.txt" />
</bean>
<bean id="fieldSetMapper"
class="org.springframework.batch.io.file.mapping.BeanWrapperFieldSetMapper">
<property name="prototypeBeanName" value="trade" />