有人用DSL完成了spring-integration-jdbc StoredProcOutboundGateway配置吗?
答案 0 :(得分:2)
没有用于JDBC的Spring Integration Java DSL。请随意就此问题提出JIRA。
作为解决方法,我们真的没有选择,除非使用通用StoredProcOutboundGateway
EIP方法中的.handle()
类:
@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)