Spring的异步方法

先把longTimeMethod 封装到Spring的异步方法中,这个异步方法的返回值是Future的实例。这个方法必定要写在Spring管理的类中,注意注解@Async。html @Service public class AsynchronousService{ @Async public Future springAsynchronousMethod(){ Integer result =
相关文章
相关标签/搜索