|
@@ -6,10 +6,7 @@ import org.springframework.stereotype.Component;
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.annotation.PreDestroy;
|
|
|
import java.util.Map;
|
|
|
-import java.util.concurrent.ConcurrentHashMap;
|
|
|
-import java.util.concurrent.Executors;
|
|
|
-import java.util.concurrent.ScheduledExecutorService;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
+import java.util.concurrent.*;
|
|
|
|
|
|
@Component
|
|
|
@Slf4j
|
|
@@ -28,7 +25,7 @@ public class StatisRequestIdTimeComp {
|
|
|
* requestId 及 时间
|
|
|
*/
|
|
|
public Map<String, Long> map = new ConcurrentHashMap<>();
|
|
|
- ScheduledExecutorService service = Executors.newScheduledThreadPool(1);
|
|
|
+ ScheduledExecutorService service =new ScheduledThreadPoolExecutor(1);
|
|
|
/**
|
|
|
* 关注的请求时间秒
|
|
|
*/
|