01. Mule ESB3之Hello world

1、官网下载 Download Mule ESB v.3.3 --> MuleStudio-CE-for-win-32bit-1.3.2-201212121943.zip

http://www.mulesoft.org/download-mule-esb-community-edition

2、解压后,启动Mule Studio
[img]http://dl.iteye.com/upload/attachment/0079/1136/9975b916-32c6-3fd2-91bd-a6d2bb5f4015.jpg[/img]

3、新建mule_project,命名为mule_demo
[img]http://dl.iteye.com/upload/attachment/0079/1140/4b7fa4d3-2a1e-3012-9772-b7561879e204.jpg[/img]
如图所示,在右边Endpoints中选择Http Enpoint并拖拽到左边空白区
在components中选择Echo拖拽到HTTP后面。对应的XML如下:

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
<flow name="mule_demoFlow1" doc:name="mule_demoFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<echo-component doc:name="Echo"/>
</flow>
</mule>


4、在mule_demo.mflow右键选择:Run As Mule Application

5、在浏览器访问:http://localhost:8081/helloworld

6、结果浏览器显示:/helloworld


各种原理暂不解释 :oops: 我也不懂...。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值