博客
关于我
Django测试工具平台(四)---Dubbo接口请求记录 + 前端
阅读量:360 次
发布时间:2019-03-04

本文共 2020 字,大约阅读时间需要 6 分钟。

????

??

???????????????

  • ??Dubbo????
  • ??????
  • ????????
  • ??????????
  • ????????????????????????????????????


    1. ??Dubbo????

    ????Dubbo????????????????????DubboControllerLogs????????

    • service_name?????
    • dubbo_method???????
    • params_type?????
    • params?????
    • user_id?????ID
    • create_time?????
    • update_time?????

    ?????????????

    • ControllerInfoSerializer???????????
    • InvokeSerializer???????????

    ?view.py?????????APIDubboApi?????Dubbo????????????????????????Dubbo???


    2. ??????

    ??????????DubboInfosView??????Q?????????????????????????????????

    • ?????DubboControllerLogs.objects.all()
    • ?????????????objects.filter(service_name__icontains=service_name, dubbo_method__icontains=dubbo_method)

    ?????????DubboPagination???????


    3. ??????

    ??????Element UI?????????????????utils???????http.js???????????MyHttpServer??????API???????URL?????????

    ?config/index.js??????????????????????


    4. ????????

    4.1 ??????

  • ???????git clone https://github.com/your-project.git
  • ???????cd your-project
  • ??MySQL???python manage.py settings.py
  • ??Zookeeper???config.ini???zookeeper??
  • ?????pip install -r package.txt
  • ???????python manage.py makemigrations?python manage.py migrate
  • ?????python manage.py runserver

  • 4.2 ??????

  • ???????git clone https://github.com/your-project-frontend.git
  • ???????cd your-project-frontend
  • ?????npm install
  • ????????npm run dev

  • 4.3 ????

  • ?????????????????????
  • ??Dubbo????????????????
  • ????????????????????

  • ??????

    • ??addStudent(UserAO user)?

      ???????

      {  "service_name": "com.zl.ITestService",  "dubbo_method": "add",  "params_type": "class",  "params": {    "class": "com.zl.entity.ao.UserAO",    "school": ["1", "2"],    "name": "zl",    "tuofa": "true"  }}
    • ??getStudent(Integer id, List name)?

      ???????

      {  "service_name": "com.zl.ITestService",  "dubbo_method": "getStudent",  "params_type": "others",  "params": [123, ["zl"]]}

    ??????

  • ???????Dubbo?????no such method?????????????????
  • Boolean??????JSON???{?data?:true}??Python?????"true"?

  • ????

    ??????Dubbo???????????????????????????????????Django??????????????????????????????????????


    ???????????????????????????????

    转载地址:http://swve.baihongyu.com/

    你可能感兴趣的文章
    Python append() 与列表上的 + 运算符,为什么这些会给出不同的结果?
    查看>>
    Python APP自动化测试工具adb与Monkey使用详解
    查看>>
    Python APP自动化测试框架Appium详解
    查看>>
    Python APP自动化测试框架开发实战
    查看>>
    python argparse模块
    查看>>
    Python asyncio库的学习和使用
    查看>>
    Python AttributeError:“dict“对象没有属性“append“
    查看>>
    Python base64和hashlib模块
    查看>>
    python basic programs
    查看>>
    python bert_gen.py 报错Unable to load weights from pytorch checkpoint file for......
    查看>>
    python binascii.Error: Incorrect padding
    查看>>
    Python bool() 函数能否为无效参数引发异常?
    查看>>
    Python C 程序子进程在“for line in iter“处挂起
    查看>>
    Python Celery:自动化测试平台定时任务必备的三方库
    查看>>
    python check_output 失败,退出状态为 1,但 Popen 适用于相同的命令
    查看>>
    Python CONNECT 4 CHECK WIN函数
    查看>>
    python cos,Python cos(90)和cos(270)不是0
    查看>>
    python进阶(4):Python 脚本文件重启自身进程
    查看>>
    python ctypes库中动态链接库加载方式
    查看>>
    python cv2 图像( np array )转 HObject
    查看>>