The custom editor configurer needs to be added to the job configuration. Also the step scope registration

OPEN - issue BATCH-115: (some) samples launched from command line don't work 
http://opensource.atlassian.com/projects/spring/browse/BATCH-115
This commit is contained in:
dsyer
2007-08-28 10:51:58 +00:00
parent 3972010e9a
commit 4c2d473874
2 changed files with 12 additions and 8 deletions

View File

@@ -27,8 +27,6 @@
</property>
</bean>
<bean id="tradeDao" class="org.springframework.batch.sample.dao.JdbcTradeWriter">
<property name="jdbcTemplate" ref="jdbcTemplate" />
<property name="incrementer">
@@ -43,6 +41,12 @@
<property name="resource" ref="fileLocator" />
<property name="tokenizer" ref="fixedFileDescriptor" />
</bean>
<bean id="fileLocator" class="org.springframework.core.io.ClassPathResource">
<constructor-arg>
<value>/data/simpleTaskletJob/input/20070122.teststream.ImportTradeDataStep.txt</value>
</constructor-arg>
</bean>
<!-- TODO: refactor this to use aop:scoped-proxy when SPR-3804 is fixed -->
<bean id="scopedInputTemplate" parent="abstractInputTemplate" autowire-candidate="false" scope="step"/>
@@ -57,11 +61,6 @@
<property name="names" value="ISIN, Quantity, Price, Customer" />
<property name="lengths" value="12, 3, 5, 9" />
</bean>
<bean id="fileLocator" class="org.springframework.core.io.ClassPathResource">
<constructor-arg type="java.lang.String"
value="data/simpleTaskletJob/input/20070122.teststream.ImportTradeDataStep.txt" />
</bean>
<bean id="tradeLogAdvice"
class="org.springframework.batch.sample.advice.TradeWriterLogAdvice" />
@@ -75,5 +74,10 @@
</aop:aspect>
</aop:config>
<bean parent="customEditorConfigurer"/>
<!-- register the step scope with the application context -->
<bean class="org.springframework.batch.execution.scope.StepScope" />
</beans>

View File

@@ -98,7 +98,7 @@
<property name="commitInterval" value="1" />
</bean>
<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
<map>
<entry key="int[]">