spring-projects / spring-integration-samples

You are looking for examples, code snippets, sample applications for Spring Integration? This is the place.
http://www.springsource.org/spring-integration
2.32k stars 2.55k forks source link

No XML example of jdbc outbound gateway #107

Open ffazil opened 10 years ago

ffazil commented 10 years ago

Is there an no xml example of the basic jdbc sample available? Am particularly interested in converting the following part using annotations.

<bean id="personResultMapper" class="org.springframework.integration.samples.jdbc.PersonMapper"/>
    <int-jdbc:outbound-gateway data-source="datasource" 
                                request-channel="createPersonRequestChannel"
                                reply-channel="createPersonReplyChannel"
                                update="insert into Person (name,gender,dateOfBirth) 
                                    values
                                    (:name,:gender,:dateOfBirth)"
                                query="select * from Person where id = :id"     
                                request-sql-parameter-source-factory="requestSource"
                                reply-sql-parameter-source-factory="replySource"
                            row-mapper="personResultMapper"
                                keys-generated="true"/>
artembilan commented 10 years ago

No, there isn't yet. However the Java and Annotations configuration samples are on our road. Do you need the solution for you instantly or just ask general question?

ffazil commented 10 years ago

It will be great if I get a solution immediately even if it is not part of 4.0.x GA release.

artembilan commented 10 years ago

Here you are: https://gist.github.com/artembilan/8d7d4cf6959c71be2cc9

Let us know, if this is enough for you