2021
08-08
08-08
Spring中注解方式的异步请求
一、Servlet3.0异步请求@WebServlet(value="/async",asyncSupported=true)publicclassHelloAsyncServletextendsHttpServlet{@OverrideprotectedvoiddoGet(HttpServletRequestreq,HttpServletResponseresp)throwsServletException,IOException{//1、设置支持异步处理asyncSupported=true//2、开启异步模式System.out.println("主线程开始:"+Thread.currentThread()+"==>"...
继续阅读 >