Set timeout for specific async request in Spring-boot

后端 未结 2 872
谎友^
谎友^ 2021-01-18 19:23

I have an sync endpoint defined as follows:

@PostMapping(\"/some/url/\")
@ResponseBody
public Future something(...) {
    ... do stuff ...
}
         


        
2条回答
  •  旧时难觅i
    2021-01-18 19:31

    Can you please try to add below property in application.properties.

    spring.mvc.async.request-timeout = # Amount of time (in milliseconds) before asynchronous request handling times out.

提交回复
热议问题