通过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 ();
}
这篇文章是原创的,未经许可不得转载