Reputation: 63
Have anyone done spring-integration-jdbc StoredProcOutboundGateway configuration with DSL ?
Upvotes: 1
Views: 433
Reputation: 121177
There is no Spring Integration Java DSL for JDBC. Feel free to raise a JIRA on the matter.
As the workaround we really don't have choice unless use StoredProcOutboundGateway
class from the generic .handle()
EIP-method:
@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)
Upvotes: 2