BATCH-2205:

MethodInvokingTaskletAdaper does not support primitive arguments.
 - Improvement of
AbstractMethodInvokingDelegator.targetClassDeclaresTargetMethod()
This commit is contained in:
Seo Kyung-Seok
2014-08-28 09:12:35 +09:00
committed by Michael Minella
parent 55ca2bc895
commit 834d8ee627
3 changed files with 13 additions and 2 deletions

View File

@@ -27,6 +27,13 @@
class="org.springframework.batch.core.step.tasklet.MethodInvokingTaskletAdapter">
<property name="targetObject" ref="value" />
<property name="targetMethod" value="execute" />
<property name="arguments">
<list>
<value>foo2</value>
<value type="int">3</value>
<value type="double">3.14</value>
</list>
</property>
</bean>
<bean id="value"

View File

@@ -50,8 +50,11 @@ public class TaskletJobFunctionalTests {
this.value = value;
}
public void execute() {
public void execute(String strValue, Integer integerValue, double doubleValue) {
assertEquals("foo", value);
assertEquals("foo2", strValue);
assertEquals(3, integerValue.intValue());
assertEquals(3.14, doubleValue, 0.01);
}
}