当前位置:网站首页>关于Gateway中使用@Controller的问题
关于Gateway中使用@Controller的问题
2022-07-06 09:17:00 【阿杆.】
gateway中不应该使用@Controller
人都给我整傻了,因为我是在网关服务上做的验证签名,用的是jwt认证,想着在网关服务上直接弄个登录的话,那个签名的密钥就可以只配置在网关上了,不用再去配另一个地方,结果整了半天,测试的时候发现根本用不了。。。
说明
以gateway作为网关时,使用@Controller,请求得到的响应中所有字段都为null且不为设定的通用返回格式。
例如:请求路径:/user/user?username=sticki,得到的参数字段全部都是null。
在gateway不应出现控制器类,应避免在gateway的类上标注@Controller。
所以我最后改成了网关服务只做签名验证,然后登陆授权的功能放到用户服务里去了。
边栏推荐
- inline详细讲解【C语言】
- 高通&MTK&麒麟 手機平臺USB3.0方案對比
- Dead loop in FreeRTOS task function
- Arduino uno R3 register writing method (1) -- pin level state change
- VIM command line notes
- Whistle+switchyomega configure web proxy
- MySQL占用内存过大解决方案
- Basic knowledge of lithium battery
- Variable parameter principle of C language function: VA_ start、va_ Arg and VA_ end
- Knowledge summary of request
猜你喜欢

荣耀Magic 3Pro 充电架构分析

JS變量類型以及常用類型轉換

JS object and event learning notes

sklearn之feature_extraction.text.CountVectorizer / TfidVectorizer

Common properties of location

数据分析之缺失值填充(重点讲解多重插值法Miceforest)

Variable star user module

Gallery's image browsing and component learning

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

MySQL占用内存过大解决方案
随机推荐
Basic operations of databases and tables ----- modifying data tables
Raspberry pie tap switch button to use
共用体(union)详解【C语言】
Variable parameter principle of C language function: VA_ start、va_ Arg and VA_ end
Basic operations of databases and tables ----- classification of data
Reno7 60W super flash charging architecture
Embedded startup process
PyTorch四种常用优化器测试
Apprentissage automatique - - régression linéaire (sklearn)
arduino获取随机数
Symbolic representation of functions in deep learning papers
荣耀Magic 3Pro 充电架构分析
arduino UNO R3的寄存器写法(1)-----引脚电平状态变化
Who says that PT online schema change does not lock the table, or deadlock
Pytorch实现简单线性回归Demo
[Red Treasure Book Notes simplified version] Chapter 12 BOM
关键字 inline (内联函数)用法解析【C语言】
Bubble sort [C language]
JS變量類型以及常用類型轉換
Working principle of genius telephone watch Z3