更新时间:2023-09-12 22:54:58
您可以通过方法参数的 @Header
注释来做到这一点:
You can do that via @Header
annotation for the method arguments:
@Publisher(channel="testChannel")
public String defaultPayload(String fname, @Header("last") String lname) {
return fname + " " + lname;
}
http://docs.spring.io/spring-integration/reference/html/message-publishing.html#publisher-annotation