What is the difference between the main method calling the third-party interface and spring MVC calling the third-party interface?

CSDN Q & A 2022-02-13 07:48:12 阅读数:740

difference main method calling third-party

stay main Method, and the result of calling the third-party interface returns success , But in spring mvc When the control layer calls, the returned token is invalid , I'd like to ask if there is any difference between the two invocation methods ?

img

img




Take the answer :

Are all third-party interface methods that are called , There is no mistake in principle . But how to call the methods of your third-party interface is incomplete , I can only guess . It can be solved from the following aspects
1.main Sure ,service Can not be , Invalid return token , You need to find out why the token is invalid . namely main Is there a token given at runtime ? If so, just solve the token , No, , You need to find a third party to bring the token .
2. The reason for the token is the limitation of its own item , Try to complete or remove .
In short, it is necessary to judge the cause of the token in combination with the situation , To start .
If help , Please accept !



Other answers 2:

main Which of the methods is to call the third-party interface , You're calling local methods .
Interfaces are different from methods .
The invalid token indicates that this interface needs to be authenticated token. You don't have a signboard token.


Other answers 3:

debug Look at the code , This kind of problem has no log , No information , It's not easy to guess , The possibility of missing parameters is relatively high


Other answers 4:

Whether the token you output is invalid or the direct prompt token is invalid , There is no necessary difference between the two Or the needs of your own project token verification

copyright:author[CSDN Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130748105439.html