当前位置:网站首页>关于Gateway中使用@Controller的问题
关于Gateway中使用@Controller的问题
2022-07-06 09:17:00 【阿杆.】
gateway中不应该使用@Controller
人都给我整傻了,因为我是在网关服务上做的验证签名,用的是jwt认证,想着在网关服务上直接弄个登录的话,那个签名的密钥就可以只配置在网关上了,不用再去配另一个地方,结果整了半天,测试的时候发现根本用不了。。。
说明
以gateway作为网关时,使用@Controller,请求得到的响应中所有字段都为null且不为设定的通用返回格式。
例如:请求路径:/user/user?username=sticki,得到的参数字段全部都是null。
在gateway不应出现控制器类,应避免在gateway的类上标注@Controller。
所以我最后改成了网关服务只做签名验证,然后登陆授权的功能放到用户服务里去了。
边栏推荐
- RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED
- I2C总线时序详解
- Selective sorting and bubble sorting [C language]
- Kconfig Kbuild
- E-commerce data analysis -- User Behavior Analysis
- Stm32f1+bc20+mqtt+freertos system is connected to Alibaba cloud to transmit temperature and humidity and control LED lights
- Time slice polling scheduling of RT thread threads
- Variable star user module
- Redis 缓存更新策略,缓存穿透、雪崩、击穿问题
- .elf .map .list .hex文件
猜你喜欢

Fashion Gen: the general fashion dataset and challenge paper interpretation & dataset introduction

Understanding of AMBA, AHB, APB and Axi

Basic operations of databases and tables ----- modifying data tables

优先级反转与死锁

Kaggle竞赛-Two Sigma Connect: Rental Listing Inquiries(XGBoost)

Walk into WPF's drawing Bing Dwen Dwen

History object

JS变量类型以及常用类型转换

Amba, ahb, APB, Axi Understanding

OPPO VOOC快充电路和协议
随机推荐
JS变量类型以及常用类型转换
Raspberry pie tap switch button to use
程序员老鸟都会搞错的问题 C语言基础 指针和数组
Who says that PT online schema change does not lock the table, or deadlock
Whistle+switchyomega configure web proxy
Arm pc=pc+8 is the most understandable explanation
【ESP32学习-1】Arduino ESP32开发环境搭建
Pytorch-温度预测
ESP8266通过Arduino IDE连接Onenet云平台(MQTT)
Kaggle competition two Sigma connect: rental listing inquiries (xgboost)
Reading notes of difficult career creation
Programmers can make mistakes. Basic pointers and arrays of C language
Machine learning -- decision tree (sklearn)
Navigator object (determine browser type)
C language callback function [C language]
Mysqldump error1066 error solution
Pytorch four commonly used optimizer tests
Basic operations of databases and tables ----- creating data tables
ESP learning problem record
Embedded startup process