当前位置:网站首页>About using @controller in gateway

About using @controller in gateway

2022-07-06 12:17:00 A pole

gateway Should not be used in @Controller

People are stupid for me , Because I verify the signature on the gateway service , It's using jwt authentication , If you want to get a login directly on the gateway service , The signed key can only be configured on the gateway , No need to go to another place , It's been a long time , During the test, I found that it didn't work at all ...

explain

With gateway As a gateway , Use @Controller, All fields in the response to the request are null And it is not the set general return format .

for example : Request path :/user/user?username=sticki, The obtained parameter fields are all null.

stay gateway Controller classes should not appear , Avoid gateway Annotation on class of @Controller.

So I finally changed the gateway service to only do signature verification , Then the login authorization function is put into the user service .

原网站

版权声明
本文为[A pole]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060913401153.html