我的xml中有类似下面的配置。我必须将两个参数传递到我的选择查询中。
< int-jdbc:outbound-gateway data-source="datasource"
update="UPDATE DUMMY SET DUMMY_VALUE='test'"
request-channel="findPersonRequestChannel"
query="select * from Person where lower(name)=:payload[name] and id =:payload[id]"
reply-channel="findPersonReplyChannel"
row-mapper="personResultMapper"
max-rows-per-poll="100" >
< /int-jdbc:outbound-gateway >
在使用上述方式时,会出现以下异常:-
Caused by: org.springframework.integration.MessagingException: At most one parameter (or expression via method-level @Payload) may be mapped to the payload or Message. Found more than one on method [public abstract java.util.List org.springframework.integration.samples.jdbc.service.PersonService.findPersonByName(java.lang.String,java.lang.String)]
任何想法,如何解决这个错误?
使用一个参数,它工作正常。