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:
@@ -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>
|
||||
@@ -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[]">
|
||||
|
||||
Reference in New Issue
Block a user