Mule 3 - Post Or Submit form using Postman and Insert data in mysql database

This is the example to submit the data to mule HTTP listener and inserting the data in MySql database.

    <flow name="demo1Flow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/demo1" allowedMethods="POST" doc:name="HTTP"/>
        <db:insert config-ref="MySQL_Configuration" doc:name="Database">
            <db:parameterized-query><![CDATA[insert into user_entity (email,name,password,dob)values(#[payload.email],#[payload.name],#[payload.password],#[payload.dob])]]></db:parameterized-query>
        </db:insert>
        <set-payload value="Data Inserted #[payload.email]" doc:name="Set Payload"/>
    </flow>
Mule Example

 

Tags