Spring-集成-jdbc StoredProcOutboundGateway with DSL

Spring-integration-jdbc StoredProcOutboundGateway with DSL

有人用 DSL 完成 spring-integration-jdbc StoredProcOutboundGateway 配置吗?

JDBC 没有 Spring 集成 Java DSL。欢迎就此事提出 JIRA

作为解决方法,我们真的别无选择,除非使用来自通用 .handle() EIP 方法的 StoredProcOutboundGateway class:

@Bean
public StoredProcExecutor storedProcExecutor() {
    StoredProcExecutor storedProcExecutor = new StoredProcExecutor(this.dataSource);
    storedProcExecutor.setStoredProcedureName("CREATE_USER_RETURN_ALL");
    storedProcExecutor.setIsFunction(true);
    ...
    return storedProcExecutor;
}

...

    StoredProcOutboundGateway storedProcOutboundGateway = new StoredProcOutboundGateway(storedProcExecutor());
    storedProcOutboundGateway.setExpectSingleResult(true);
    storedProcOutboundGateway.setRequiresReply(true);

...

.handle(storedProcOutboundGateway)