Finish off placeholder test with method invoking tasklet
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beansProjectDescription>
|
||||
<version>1</version>
|
||||
<pluginVersion><![CDATA[2.2.3.RELEASE]]></pluginVersion>
|
||||
<pluginVersion><![CDATA[2.2.4.RELEASE]]></pluginVersion>
|
||||
<configSuffixes>
|
||||
<configSuffix><![CDATA[xml]]></configSuffix>
|
||||
</configSuffixes>
|
||||
@@ -70,6 +70,7 @@
|
||||
<config>src/test/resources/org/springframework/batch/sample/PartitionJobFunctionalTests-context.xml</config>
|
||||
<config>src/main/resources/jobs/multilineOrderValidator.xml</config>
|
||||
<config>src/main/resources/jobs/restartFileSampleJob.xml</config>
|
||||
<config>src/main/resources/jobs/taskletJob.xml</config>
|
||||
</configs>
|
||||
<configSets>
|
||||
<configSet>
|
||||
|
||||
@@ -1,31 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns:batch="http://www.springframework.org/schema/batch"
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/batch
|
||||
http://www.springframework.org/schema/batch/spring-batch-2.0.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:batch="http://www.springframework.org/schema/batch"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
|
||||
xmlns:p="http://www.springframework.org/schema/p">
|
||||
|
||||
<!-- The tasklet used in this job will run in an infinite loop. This is useful for testing graceful shutdown from
|
||||
multiple environments. -->
|
||||
<!--
|
||||
The tasklet used in this job does nothing. The sample shows how to use
|
||||
a method invoking adapter and also how to configure step scope with
|
||||
non-default settings. Proxy target class (true) is needed because the
|
||||
target method is not defined in an interface.
|
||||
-->
|
||||
|
||||
<bean class="org.springframework.batch.core.scope.StepScope"
|
||||
p:proxyTargetClass="true" />
|
||||
|
||||
<batch:job id="loopJob">
|
||||
<batch:step id="step1">
|
||||
<batch:tasklet ref="adapter"/>
|
||||
<batch:tasklet ref="adapter" />
|
||||
</batch:step>
|
||||
</batch:job>
|
||||
|
||||
<bean id="adapter" class="org.springframework.batch.core.step.tasklet.MethodInvokingTaskletAdapter">
|
||||
<property name="targetObject" ref="value"/>
|
||||
<property name="targetMethod" value="toString"/>
|
||||
<bean id="adapter"
|
||||
class="org.springframework.batch.core.step.tasklet.MethodInvokingTaskletAdapter">
|
||||
<property name="targetObject" ref="value" />
|
||||
<property name="targetMethod" value="execute" />
|
||||
</bean>
|
||||
|
||||
<bean id="value" class="org.springframework.batch.sample.TaskletJobFunctionalTests$TestBean" scope="step">
|
||||
<property name="value" value="#{jobParameters[value]}"/>
|
||||
|
||||
<bean id="value"
|
||||
class="org.springframework.batch.sample.TaskletJobFunctionalTests$TestBean"
|
||||
scope="step">
|
||||
<property name="value" value="#{jobParameters[value]}" />
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user