当前位置:网站首页>关于Gateway中使用@Controller的问题
关于Gateway中使用@Controller的问题
2022-07-06 09:17:00 【阿杆.】
gateway中不应该使用@Controller
人都给我整傻了,因为我是在网关服务上做的验证签名,用的是jwt认证,想着在网关服务上直接弄个登录的话,那个签名的密钥就可以只配置在网关上了,不用再去配另一个地方,结果整了半天,测试的时候发现根本用不了。。。
说明
以gateway作为网关时,使用@Controller,请求得到的响应中所有字段都为null且不为设定的通用返回格式。
例如:请求路径:/user/user?username=sticki,得到的参数字段全部都是null。
在gateway不应出现控制器类,应避免在gateway的类上标注@Controller。
所以我最后改成了网关服务只做签名验证,然后登陆授权的功能放到用户服务里去了。
边栏推荐
- Imgcat usage experience
- Whistle+switchyomega configure web proxy
- Knowledge summary of request
- 冒泡排序【C语言】
- Machine learning -- linear regression (sklearn)
- Priority inversion and deadlock
- Custom view puzzle getcolor r.color The color obtained by colorprimary is incorrect
- JS regular expression basic knowledge learning
- C语言回调函数【C语言】
- Comparaison des solutions pour la plate - forme mobile Qualcomm & MTK & Kirin USB 3.0
猜你喜欢

Types de variables JS et transformations de type communes
![Detailed explanation of Union [C language]](/img/d2/99f288b1705a3d072387cd2dde827c.jpg)
Detailed explanation of Union [C language]

E-commerce data analysis -- salary prediction (linear regression)

ESP learning problem record

Vscode basic configuration
![[Red Treasure Book Notes simplified version] Chapter 12 BOM](/img/ff/0ad410b5b556c0e16a4076a2a0577b.jpg)
[Red Treasure Book Notes simplified version] Chapter 12 BOM

level16

JS regular expression basic knowledge learning

RT-Thread 线程的时间片轮询调度

Analysis of charging architecture of glory magic 3pro
随机推荐
inline详细讲解【C语言】
RT-Thread的main线程“卡死”的一种可能原因及解决方案
Esp8266 uses Arduino to connect Alibaba cloud Internet of things
[template] KMP string matching
Time slice polling scheduling of RT thread threads
C语言,log打印文件名、函数名、行号、日期时间
C language callback function [C language]
[Red Treasure Book Notes simplified version] Chapter 12 BOM
Arduino get random number
JS 函数提升和var变量的声明提升
Walk into WPF's drawing Bing Dwen Dwen
. elf . map . list . Hex file
Pytorch-温度预测
电商数据分析--用户行为分析
Basic knowledge of lithium battery
Amba, ahb, APB, Axi Understanding
MySQL占用内存过大解决方案
Comparison of solutions of Qualcomm & MTK & Kirin mobile platform USB3.0
List and set
Variable parameter principle of C language function: VA_ start、va_ Arg and VA_ end