mule Getting started with mule Basic example to access a database and select all records in the database using anypoint studio

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration"/>

<db:mysql-config name="MySQL_Configuration" host="${db.host}" port="${db.port}" user="${db.user}" password="${db.password}" database="${db.database}" doc:name="MySQL Configuration"/>

<context:property-placeholder location="prop.properties"/>

<flow name="Total">
    <http:listener config-ref="HTTP_Listener_Configuration" path="/" allowedMethods="GET" doc:name="HTTP"/>

    <db:select config-ref="MySQL_Configuration" doc:name="Database">
        <db:parameterized-query><![CDATA[SELECT * FROM TableName]]></db:parameterized-query>
    </db:select>

    <json:object-to-json-transformer doc:name="Total"/>

</flow>http://stackoverflow.com/documentation/mule/4147/getting-started-with-mule/28752/mule-flow-xml-for-simple-hello-example#


Got any mule Question?