首页 > 编程知识 正文

java解决高并发的几种方法,java接口自动化框架搭建

时间:2023-05-05 01:21:48 阅读:115542 作者:852

通过JVA并行接口开发提高性能:

//*

@getmapping(/user/info ) )。

结果用户info (throwsexecutionexception,InterruptedException {

stopwatch stopwatch=new stopwatch (;

stopWatch.start (;

stopWatch.stop (;

return result.ok (stopwatch.gettotaltimemillis ();

}

//*

@getmapping(/info ) ) )。

结果信息(throws exception )。

stopwatch stopwatch=new stopwatch (;

stopWatch.start (;

future future=thread util.exec async (

stopwatch stopwatch1=new stopwatch (;

stopWatch1.start (;

stopWatch1.stop (;

返回stopwatch1. gettotaltimemillis (;

);

future future1=thread util.exec async (

stopwatch stopwatch1=new stopwatch (;

stopWatch1.start (;

stopWatch1.stop (;

返回stopwatch1. gettotaltimemillis (;

);

stopWatch.stop (;

return result.ok (stopwatch.gettotaltimemillis ();

}

这篇文章是原创的,未经许可不得转载

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。