mulesoft --环境安装与搭建

MuleSoft ESB介绍

1.maven+jdk+postman

2.anypoint statdio 下载安装

下载 Anypoint Studio & Mule |骡子软件 (mulesoft.com)

填好基本信息后,会发邮件,在邮件中下载,跳到官网下载

3注册账号 Download Anypoint Studio & Mule | MuleSoft 

4.Connectors | MuleSoft Documentation

5.界面介绍

https://www.cnblogs.com/luqinghua/p/12790525.html

6数据格式转换

json转dw

%dw 2.0

output application/dw

---

payload

json 数据格式重新映射

%dw 2.0

output application/json

---

{

"iddddii":payload.total,

"nameeee":payload.msg

}

 json 转 person 标签下的 xml

%dw 2.0

output application/xml

---

{

person:payload

}

 结果:

<?xml version='1.0' encoding='UTF-8'?>
<person>
  <total>1</total>
  <rows>
    <searchValue/>
    <createBy>admin</createBy>
    <createTime>2024-01-26 10:01:37</createTime>
    <updateBy/>
    <updateTime/>
    <remark/>
    <params/>
    <followId>4694</followId>
    <researchId>681</researchId>
    <followStartDate/>
    <followEndDate/>
    <followInterval>0</followInterval>
    <followIntervalUnit>1</followIntervalUnit>
    <followFrequency>1</followFrequency>
    <followTotal/>
    <followNum>0</followNum>
    <followName>注册登记</followName>
    <templateName/>
    <positionType/>
    <hasUnstructuredAttr/>
    <fmedicalForms>
      <searchValue/>
      <createBy/>
      <createTime/>
      <updateBy/>
      <updateTime/>
      <remark/>
      <params/>
      <medicalFormId>51676</medicalFormId>
      <medicalCode>baseRegiter</medicalCode>
      <medicalName>基本信息</medicalName>
      <parentId>0</parentId>
      <openImage>0</openImage>
      <openProperty>0</openProperty>
      <openMultiple/>
      <attribute>{
  "layout": "rowFormItem",
  "isShowDom": true,
  "tagIcon": "row",
  "labelType": "form",
  "isShowSubTitle": false,
  "subTitle": "",
  "justify": "start",
  "align": "top",
  "formCode": "baseRegiter",
  "formName": "基础信息",
  "isPCDoctorShow": true,
  "isDoctorShow": true,
  "isPatientShow": true,
  "formType": "1"
}</attribute>
      <formType>0</formType>
      <followId>4694</followId>
      <medicalFormList/>
      <medicalProperties/>
      <baseFormId/>
      <articleId/>
      <formSource>1</formSource>
      <dynamic>0</dynamic>
      <patientRecordFiles/>
      <subjectList/>
      <propertyNum>27</propertyNum>
      <edcNum>0</edcNum>
      <lockFlag/>
      <openCollapse>0</openCollapse>
      <sortNum>1</sortNum>
      <positionType>1</positionType>
      <isDoctorShow>true</isDoctorShow>
      <isPatientShow>false</isPatientShow>
      <isPCDoctorShow>true</isPCDoctorShow>
      <scoresTotalVal/>
      <projectName/>
    </fmedicalForms>
    <fmedicalForms>
      <searchValue/>
      <createBy/>
      <createTime>2024-01-26 10:01:57</createTime>
      <updateBy/>
      <updateTime/>
      <remark/>
      <params/>
      <medicalFormId>51682</medicalFormId>
      <medicalCode>modelegites</medicalCode>
      <medicalName>多选</medicalName>
      <parentId>0</parentId>
      <openImage>0</openImage>
      <openProperty>0</openProperty>
      <openMultiple/>
      <attribute>{"layout":"rowFormItem","isShowDom":true,"tagIcon":"row","labelType":"form","type":"flex","isShowSubTitle":false,"subTitle":"","justify":"start","align":"top","formCode":"modelegites","formName":"多选","isPCDoctorShow":true,"isDoctorShow":true,"isPatientShow":true,"formType":0}</attribute>
      <formType>0</formType>
      <followId>4694</followId>
      <medicalFormList/>
      <medicalProperties/>
      <baseFormId/>
      <articleId/>
      <formSource>1</formSource>
      <dynamic>0</dynamic>
      <patientRecordFiles/>
      <subjectList/>
      <propertyNum>1</propertyNum>
      <edcNum>0</edcNum>
      <lockFlag/>
      <openCollapse>0</openCollapse>
      <sortNum>1</sortNum>
      <positionType>1</positionType>
      <isDoctorShow>true</isDoctorShow>
      <isPatientShow>true</isPatientShow>
      <isPCDoctorShow>true</isPCDoctorShow>
      <scoresTotalVal/>
      <projectName/>
    </fmedicalForms>
  </rows>
  <code>200</code>
  <msg>查询成功</msg>
  <data/>
</person>

 转换其中的一部分数据

%dw 2.0

output application/xml

---

{

person:{

code:payload.code,

msg:payload.msg

}

}

 结果:

<?xml version='1.0' encoding='UTF-8'?>
<person>
  <code>200</code>
  <msg>查询成功</msg>
</person>

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值