/** * 测试ThreadPool * @param request * @return */ @RequestMapping(value = "/testThreadPool",produces="application/json") public @ResponseBody String testThreadPool() { logger.info("测试ThreadPool,开始==="); for(int i=0;i<10;i++) { ThreadPool.getThreadPool().execute(new TaskThread("T" + (i+1))); } logger.info("测试ThreadPool,结束==="); return "testThreadPoolOK~"; } /** * 测试ThreadPoolDestroy * @param request * @return */ @RequestMapping(value = "/testThreadPoolDestroy",produces="application/json") public @ResponseBody String testThreadPoolDestroy() { logger.info("测试ThreadPoolDestroy,开始==="); ThreadPool.getThreadPool().destroy(); logger.info("测试ThreadPoolDestroy,结束==="); return "testThreadPoolDestroyOK~"; }