好的。看起来你的问题是你没有捕获异常来继续。请参阅async以下选项ServiceActivatingHandler:/** * Allow async replies. If the handler reply is a {@link ListenableFuture}, send * the output when it is satisfied rather than sending the future as the result. * Ignored for return types other than {@link ListenableFuture}. * @param async true to allow. * @since 4.3 */public final void setAsync(boolean async) {因此,仅当从目标实现返回a (或 Reactive )时,它才真正是异步的。这不是事实。因此,您的网关定义是正确的方法。尽管您需要从中返回一些内容,但这将是网关调用的返回。否则我们就会陷入等待回复或错误的境地。ListenableFuturePublsiherhandleRequestMessage()SftpOutboundGatewayerrorChannel = "sftp.error.channel"sftpErrorHandler