当前位置:网站首页>关于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语言,log打印文件名、函数名、行号、日期时间
- Dependency in dependencymanagement cannot be downloaded and red is reported
- Comparison of solutions of Qualcomm & MTK & Kirin mobile platform USB3.0
- 电商数据分析--用户行为分析
- Priority inversion and deadlock
- Mysqldump error1066 error solution
- Apprentissage automatique - - régression linéaire (sklearn)
- Togglebutton realizes the effect of switching lights
- Unit test - unittest framework
- C语言回调函数【C语言】
猜你喜欢
Arduino uno R3 register writing method (1) -- pin level state change
Oppo vooc fast charging circuit and protocol
Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights
Programmers can make mistakes. Basic pointers and arrays of C language
Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
Priority inversion and deadlock
Basic operations of databases and tables ----- modifying data tables
C语言回调函数【C语言】
Variable star user module
Reno7 60W超级闪充充电架构
随机推荐
MySQL占用内存过大解决方案
ESP learning problem record
Several declarations about pointers [C language]
Keyword inline (inline function) usage analysis [C language]
Knowledge summary of request
Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
Imgcat usage experience
Pytorch four commonly used optimizer tests
E-commerce data analysis -- User Behavior Analysis
Reno7 60W super flash charging architecture
map文件粗略分析
ESP8266通过arduino IED连接巴法云(TCP创客云)
JS變量類型以及常用類型轉換
STM32 how to locate the code segment that causes hard fault
Kaggle competition two Sigma connect: rental listing inquiries (xgboost)
Comparison of solutions of Qualcomm & MTK & Kirin mobile platform USB3.0
【ESP32学习-2】esp32地址映射
Navigator object (determine browser type)
Reading notes of difficult career creation
荣耀Magic 3Pro 充电架构分析