I wanna set a time to resolve a method cost too many time.
I try some config in application.yml
but doesn't work. I hope it can return some err but it return "true"
server: tomcat: connection-timeout: 1sspring: mvc: async: request-timeout: 1s
this is my test controller
@RestController@RequestMapping("/test")public class TimeoutTest { @RequestMapping("/test") public String test() { try { System.out.println("start"); Thread.sleep(3000); System.out.println("end"); } catch (InterruptedException e) { e.printStackTrace(); } return "true"; }}
how can I do? and what's means about those tow doesn't work config?