BATCH-2205:
MethodInvokingTaskletAdaper does not support primitive arguments. - Improvement of AbstractMethodInvokingDelegator.targetClassDeclaresTargetMethod()
This commit is contained in:
committed by
Michael Minella
parent
55ca2bc895
commit
834d8ee627
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user