@MessagingGateway
允许defaultRequestChannel
使用属性占位符${} 来设置注释:
@MessagingGateway(defaultRequestChannel = "${gateway.request.channel}")
public interface MessageGateway {
@Gateway(requestTimeout = 2000)
void sendListing(List<Path> entries);
}
但我无法对@Gateway注释进行类似操作:
@MessagingGateway
public interface MessageGateway {
@Gateway(requestTimeout = 2000, requestChannel = "${gateway.request.channel}") // invalid
void sendListing(List<Path> entries);
}
类似地,我无法使用属性占位符或 SpEl 动态设置 ServiceActivator inputChannel
。outputChannel
我是否需要ServiceActivator
使用手动配置ServiceActivatingHandler
?