I did not find Baidu for a long time to ask, springboot how to set the timeout of ajax requests?

the 5 minutes set by my front desk, but the browser shows the timeout in 2 minutes, so I suspect that springboot has set the default timeout. How to modify it? I haven"t found the correct available settings for Baidu for a long time.


this is set by tomcat


my problem has been solved. It is the timeout of webpack's proxy default setting. Just modify the default timeout.

the following key points:

timeout: 1920000,
detailed configuration:

proxyTable: {

 
    timeout: 1920000,
  }
},

searched for a long time and found this similar problem on stackoverflow,
https://stackoverflow.com/que...

I felt that this might be the reason, and then I created a new project on this machine that did not use proxy and found that there was no 2-minute limit, so it was very likely that the webpack agent set the timeout. I looked around the webpack official website and did not find the corresponding api
https://webpack.js.org/config...

I set a timeout of 5 minutes at the front end,

No timeout is set for the backend springboot;

however, two minutes after the request is made, the browser prompts for a timeout;

where are these two minutes set? Where is the default configuration of the browser or the back end


springboot has such a configuration
spring.mvc.async.request-timeout:
this is the default timeout for setting async. If this property is not set, the timeout of the web container will prevail

Menu