Home > Back-end >  Questions about the Spring @ Async asynchronous execution method, various bosses to reassure
Questions about the Spring @ Async asynchronous execution method, various bosses to reassure

Time:01-28

The code is shown in figure:


XueQiuFinanceService. GetFinanceJson (ipoCodeStr) method is a network request, the HTTP request to return a string, don't know if the asynchronous thread perform network request what pay attention to? Before I use
 ExecutorService ExecutorService=Executors. NewFixedThreadPool (MAX_THREADS); 
way to implement multithreaded also appeared the same problem,
Beg of bigwigs doubt! thank you

CodePudding user response:

By the way, I put the financeJson parameters coming from outside, everything is executed to normal

CodePudding user response:

Try catch, there may be the spot anomalies
  • Related