当前位置:网站首页>关于Gateway中使用@Controller的问题
关于Gateway中使用@Controller的问题
2022-07-06 09:17:00 【阿杆.】
gateway中不应该使用@Controller
人都给我整傻了,因为我是在网关服务上做的验证签名,用的是jwt认证,想着在网关服务上直接弄个登录的话,那个签名的密钥就可以只配置在网关上了,不用再去配另一个地方,结果整了半天,测试的时候发现根本用不了。。。
说明
以gateway作为网关时,使用@Controller,请求得到的响应中所有字段都为null且不为设定的通用返回格式。
例如:请求路径:/user/user?username=sticki,得到的参数字段全部都是null。
在gateway不应出现控制器类,应避免在gateway的类上标注@Controller。
所以我最后改成了网关服务只做签名验证,然后登陆授权的功能放到用户服务里去了。
边栏推荐
- 列表的使用
- Esp8266 connects to onenet cloud platform (mqtt) through Arduino IDE
- FreeRTOS 任务函数里面的死循环
- Keyword inline (inline function) usage analysis [C language]
- 几个关于指针的声明【C语言】
- Inline detailed explanation [C language]
- MySQL占用内存过大解决方案
- 关键字 inline (内联函数)用法解析【C语言】
- Arm pc=pc+8 is the most understandable explanation
- JS变量类型以及常用类型转换
猜你喜欢

Oppo vooc fast charging circuit and protocol

Characteristics, task status and startup of UCOS III

Pytorch four commonly used optimizer tests

E-commerce data analysis -- salary prediction (linear regression)

Basic knowledge of lithium battery

Vscode basic configuration

高通&MTK&麒麟 手机平台USB3.0方案对比

Cannot change version of project facet Dynamic Web Module to 2.3.

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

【ESP32学习-2】esp32地址映射
随机推荐
ES6语法总结--下篇(进阶篇 ES6~ES11)
map文件粗略分析
Pytorch实现简单线性回归Demo
Gallery's image browsing and component learning
OPPO VOOC快充电路和协议
Pytorch-温度预测
C language callback function [C language]
.elf .map .list .hex文件
FreeRTOS 任务函数里面的死循环
Pytorch four commonly used optimizer tests
js题目:输入数组,最大的与第一个元素交换,最小的与最后一个元素交换,输出数组。
ESP8266使用arduino连接阿里云物联网
锂电池基础知识
Missing value filling in data analysis (focus on multiple interpolation method, miseforest)
高通&MTK&麒麟 手機平臺USB3.0方案對比
Fashion-Gen: The Generative Fashion Dataset and Challenge 论文解读&数据集介绍
Bubble sort [C language]
The first simple case of GNN: Cora classification
PyTorch四种常用优化器测试
Unit test - unittest framework