当前位置:网站首页>关于Gateway中使用@Controller的问题
关于Gateway中使用@Controller的问题
2022-07-06 09:17:00 【阿杆.】
gateway中不应该使用@Controller
人都给我整傻了,因为我是在网关服务上做的验证签名,用的是jwt认证,想着在网关服务上直接弄个登录的话,那个签名的密钥就可以只配置在网关上了,不用再去配另一个地方,结果整了半天,测试的时候发现根本用不了。。。
说明
以gateway作为网关时,使用@Controller,请求得到的响应中所有字段都为null且不为设定的通用返回格式。
例如:请求路径:/user/user?username=sticki,得到的参数字段全部都是null。
在gateway不应出现控制器类,应避免在gateway的类上标注@Controller。
所以我最后改成了网关服务只做签名验证,然后登陆授权的功能放到用户服务里去了。
边栏推荐
猜你喜欢
共用体(union)详解【C语言】
Kaggle竞赛-Two Sigma Connect: Rental Listing Inquiries
C language callback function [C language]
open-mmlab labelImg mmdetection
Amba, ahb, APB, Axi Understanding
基于Redis的分布式锁 以及 超详细的改进思路
Pytorch four commonly used optimizer tests
Gallery's image browsing and component learning
Detailed explanation of 5g working principle (explanation & illustration)
Missing value filling in data analysis (focus on multiple interpolation method, miseforest)
随机推荐
Comparaison des solutions pour la plate - forme mobile Qualcomm & MTK & Kirin USB 3.0
Working principle of genius telephone watch Z3
Kaggle competition two Sigma connect: rental listing inquiries (xgboost)
STM32 如何定位导致发生 hard fault 的代码段
高通&MTK&麒麟 手機平臺USB3.0方案對比
Esp8266 connects to bafayun (TCP maker cloud) through Arduino IED
ESP learning problem record
History object
arduino UNO R3的寄存器写法(1)-----引脚电平状态变化
js 变量作用域和函数的学习笔记
Arduino get random number
高通&MTK&麒麟 手机平台USB3.0方案对比
电商数据分析--薪资预测(线性回归)
Several declarations about pointers [C language]
STM32 how to locate the code segment that causes hard fault
基于Redis的分布式锁 以及 超详细的改进思路
选择法排序与冒泡法排序【C语言】
Priority inversion and deadlock
[golang] leetcode intermediate - fill in the next right node pointer of each node & the k-smallest element in the binary search tree
open-mmlab labelImg mmdetection