当前位置:网站首页>关于Gateway中使用@Controller的问题
关于Gateway中使用@Controller的问题
2022-07-06 09:17:00 【阿杆.】
gateway中不应该使用@Controller
人都给我整傻了,因为我是在网关服务上做的验证签名,用的是jwt认证,想着在网关服务上直接弄个登录的话,那个签名的密钥就可以只配置在网关上了,不用再去配另一个地方,结果整了半天,测试的时候发现根本用不了。。。
说明
以gateway作为网关时,使用@Controller,请求得到的响应中所有字段都为null且不为设定的通用返回格式。
例如:请求路径:/user/user?username=sticki,得到的参数字段全部都是null。
在gateway不应出现控制器类,应避免在gateway的类上标注@Controller。
所以我最后改成了网关服务只做签名验证,然后登陆授权的功能放到用户服务里去了。
边栏推荐
猜你喜欢

程序员老鸟都会搞错的问题 C语言基础 指针和数组

高通&MTK&麒麟 手機平臺USB3.0方案對比

基于Redis的分布式ID生成器

Common properties of location
![Several declarations about pointers [C language]](/img/9b/ace0abbd1956123a945a98680b1e86.png)
Several declarations about pointers [C language]

Esp8266 uses Arduino to connect Alibaba cloud Internet of things

Machine learning -- linear regression (sklearn)
![[Red Treasure Book Notes simplified version] Chapter 12 BOM](/img/ff/0ad410b5b556c0e16a4076a2a0577b.jpg)
[Red Treasure Book Notes simplified version] Chapter 12 BOM

Navigator object (determine browser type)

AMBA、AHB、APB、AXI的理解
随机推荐
2022.2.12 resumption
程序员老鸟都会搞错的问题 C语言基础 指针和数组
Imgcat usage experience
Arm pc=pc+8 is the most understandable explanation
Fashion-Gen: The Generative Fashion Dataset and Challenge 论文解读&数据集介绍
JS object and event learning notes
I2C总线时序详解
Kconfig Kbuild
Basic operations of databases and tables ----- creating data tables
Arduino gets the length of the array
C语言回调函数【C语言】
[esp32 learning-2] esp32 address mapping
RT thread API reference manual
ESP学习问题记录
R & D thinking 01 ----- classic of embedded intelligent product development process
Esp8266 uses Arduino to connect Alibaba cloud Internet of things
Common properties of location
Reno7 60W超级闪充充电架构
Kaggle competition two Sigma connect: rental listing inquiries
电商数据分析--用户行为分析