博客
关于我
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 redis连接,在Python中使用Redis连接池的正确方法
    查看>>
    python regex_Python RegEx
    查看>>
    python requests post 中文结果请求得到unicode
    查看>>
    Python Requests接口自动化测试实战
    查看>>
    Python requests模块
    查看>>
    python request与grequests该如何选择
    查看>>
    python request模块
    查看>>
    Python requirements.txt的使用方法
    查看>>
    Python REST(Web 服务)框架的推荐?
    查看>>
    Python rsa 加密
    查看>>
    Python RSA操作
    查看>>
    Python轻松实现统计学中重要的相关性分析
    查看>>
    Python scrapy 常见问题及解决 【遇到的坑】
    查看>>
    Python Seborn热图数据的动态更新
    查看>>
    Python Seborn绘制空白直方图
    查看>>
    Python Selenium - 获取href值
    查看>>
    Python Selenium实现自动化测试及Chrome驱动使用!
    查看>>
    Python Selenium搭建UI自动化测试框架
    查看>>
    Python Selenium模块详解
    查看>>
    Python selenium爬取影评生成词云图
    查看>>