Below is my ItemProcessor bean, I am implementing ItemProcessor interface. It works fine but
<beans:bean id="myItemProcessor"
class="com.st.foundation.MyItemProcessor"
p:id="#{jobParameters[date]}" p:type="my-type"
scope="step" />
I want to combine many such beans in to single pojo and use an ItemProcessorAdapter.
<beans:bean id="myItemProcessor"
class="org.springframework.batch.item.adapter.ItemProcessorAdapter"
p:targetObject-ref="myObject" p:targetMethod="myMethod"
p:arguments="{jobParameters[date]}" scope="step" />
But my targetMethod has multiple arguments (type argument along with id). How can I pass multiple arguments to the adapter as it has only p:arguments parameter ?
I tried separating arguments by comma but it doesn't work. Getting error "target class must declare a method with matching name and parameter types".
Also I tried using
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/batch"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:file="http://www.springframework.org/schema/integration/file"
xmlns:integration="http://www.springframework.org/schema/integration"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<util:list id="myList" value-type="java.lang.String">
<value>foo</value>
<value>bar</value>
</util:list>
from this How to define a List bean in Spring?
But I am getting "cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'value'."