当前位置:网站首页>Resttemplate multiple authentication information authorization
Resttemplate multiple authentication information authorization
2022-06-21 20:04:00 【GodSure0914】
Business scenario , I spliced a request header through the program , Then put the request header in HttpHeaders adopt RestTemplate Call exit gateway , Pass the interface test swagger There is absolutely no problem with calling , But once it is sent to the server and called by the program, an error will be reported 
You can see from the log , What's reported here is json Conversion error , But by log The log discovery involves my own splicing Authorization No problem , Finally, print the log at the exit gateway and find restTemplate Two... Were passed on the request Authorization In the past , The gateway only takes the first one for analysis , The reason for the problem is that the browser itself has an authentication information ,java The code uses when assigning this authentication information HttpHeaders Of add Method , and add The method is based on the original information , So when the gateway resolves, it only resolves the browser segment , It eventually leads to an error report , take add Change to set Then the problem is solved , The worst is through swagger Local calls can't find this problem at all !!!


边栏推荐
- [cvpr2022] CMU tutorial on multimodal machine learning, 200+ pages to explain the knowledge of multimodal learning system with six challenges of representation, alignment, reasoning, migration, genera
- Linux MySQL command
- 如何在Chrome浏览器中模拟请求或修改请求的域名
- RPA财务流程自动化 | 浦发集团携手云扩科技加速财务数字化运营
- [interval and topic prefix and] prefix and + hash table application questions
- Novice uses apiccloud visual development to build the mall home page
- The GLM function of R language is used to build a binary logistic regression model (the family parameter is binomial), and the coef function is used to obtain the model coefficients and analyze the me
- Jupyter Notebook启动方式及相关问题
- 张至顺道长自述
- linux-mysql-命令
猜你喜欢

With a playback volume of up to 4000w+, how do couples get out of the ring by scattering dog food?

【ICML2022】CtrlFormer: 通过Transformer学习视觉控制的可迁移状态表示

Source code analysis of ArrayList

播放量高达4000w+,情侣如何靠撒狗粮出圈?

Uniapp applet opens the map and selects the location demo effect wx Chooselocation

Custom code template

After the 80 version of Google browser, how to deal with the problem samesite cross domain problem

Tableapi & SQL and example module of Flink

MFC界面库BCGControlBar v33.0 - 桌面警报窗口、网格控件升级

2022年下半年传统产品经理国际资格认证招生简章(NPDP)
随机推荐
Kubernetes migration of persistent volumes across storageclasses Complete Guide
Gradle download and installation configuration
Source code analysis of ArrayList
RecycleView拖动效果
机器学习之贝叶斯分类与集成学习
转发提醒 MetaMask小狐狸钱包安全公告 如何应对拓展程序潜在的私钥泄露
The R language uses the DOTPLOT function of epidisplay package to visualize the frequency of data points in different intervals in the form of point graph, uses the by parameter to specify the groupin
NSIS 运行bat的方法汇总
HMS Core机器学习服务身份证识别功能,实现信息高效录入
Jupyter notebook compiles ipynb files into latex and then converts them into PDF
CPDA|数据分析师需要具备哪些基本功?
动态规划【一】(背包问题)
Grain College p40~43
When the move protocol beta is in progress, the ecological core equity Momo is divided
API de table & SQL et module d'échantillon pour le système Flink
出院小结识别api接口-医疗票据OCR识别/出院诊断记录/电子病历/理赔服务
MFC interface library bcgcontrolbar v33.0 - Desktop alert window, grid control upgrade
日常开发常用工具提升效率
inno setup 安装路径框学习
删除倒数第k个节点-链表专题