当前位置:网站首页>swagger Authorization测试
swagger Authorization测试
2022-04-22 16:52:00 【liuerchong】
前言
在现在前后端分离开发模式中,api文档是最好的沟通方式.所以swagger成了炙手可热的工具了.Swagger是一个规范的和完整的框架,用于生成,描述,调用和可视化RestFul风格的web服务.
特性:
1.及时性(接口变更后,能够及时的准确的通知相关前后端的开发人员)
2.规范性(并且保持接口的规范性,比如说,接口的地址,请求方式,参数及其响应格式和错误信息)
3. 一致性(接口信息一致,不会出现因为开发人员拿到的版本不一致,而出现分歧)
4. 可测性(直接在接口文档上进行测试,以方便理解业务)
使用postman进行测试,当我们有大量服务的时候,这种方式会非常繁琐,所以这节我们通过swagger来进行通信测试
访问地址
Swagger各版本访问地址:
3.+访问地址:
http://localhost:8081/{context-path}/swagger-ui/index.html
2.+ 访问地址:
http://localhost:8081/{context-path}/swagger-ui.html
验证


登录系统,打开F12请求头部分会看到如图所示部分
复制 JSESSIONID 后边有个Token的部分到swagger value部分,点击try out,再点击execute,最终执行成功;再复制请求主体部分再点击execute,最终执行成功;
版权声明
本文为[liuerchong]所创,转载请带上原文链接,感谢
https://blog.csdn.net/liuerchong/article/details/124323052
边栏推荐
- SDN学习之Opendaylight浅析(二)
- Code implementation of sequence table
- VSCode插件打包迁移与指定位置
- Facing the global market, platefarm today logs in to four major global platforms such as Huobi
- 详解JVM内存模型
- CVPR2019领域自适应/语义分割:Adapting Structural Information across Domains for Boosting Sema适应结构信息跨领域促进语义分割
- 20220421 硬件成像
- [corner detection]
- C ODBC loads the files of one folder into the blob column of Oracle database and downloads the blob column to another folder
- Data security audit OTP configuration
猜你喜欢

SDN学习之Opendaylight浅析(一)

FRP reverse proxy

IDEA代码重构小技巧(VIP典藏版)

SDN学习之Opendaylight浅析(四)

2022最贵新股来了,小米、华为小赚10倍

ifconfig、route、ip route、ip addr、 ip link 用法

Knowing that it is listed in Hong Kong, it is the first Chinese concept stock to return to Hong Kong with dual main listing

NFT 平台安全指南

AQS source code reading

Detailed data of db107-asemi rectifier bridge
随机推荐
最新流程引擎 flowable 6.7.2 更新说明
2023年武汉理工大学能源动力(085800)考研上岸前辈备考经验指导
webRTC之RTP封装与解封装
Blue Bridge Cup exercise 015
BACKBONE,NECK,HEAD
4亿女性刚需,各路资本杀伐:藏在卫生巾里的1000亿生意
Detailed data of db107-asemi rectifier bridge
Anti epidemic artifact: automatic identification of health code and travel code!
斗志斗勇之mysql
CrashSight 常规功能&特色功能介绍
使用AppCube,零门槛快速搭建5G消息服务号
抗疫神器:健康码、行程码自动识别!
Knowing that it is listed in Hong Kong, it is the first Chinese concept stock to return to Hong Kong with dual main listing
Cvpr2019 domain adaptation / semantic segmentation: adapting structural information across domains for boosting SEMA
数据分析7大能力:梳理数据需求
7 capabilities of data analysis: sorting out data needs
Performance evaluation of rust asynchronous framework
多线程使用redis进行累加结果不对解决方案
国产手机品牌才发现,没有国内消费者支持它们什么也不是
2022最贵新股来了,小米、华为小赚10倍