Ver código fonte

无车优化,自有车接口返回

Administrator 3 anos atrás
pai
commit
0593c3f72a

+ 5 - 0
src/main/java/com/jkcredit/invoice/component/StatisRequestIdTimeComp.java

@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
 import java.util.Date;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
@@ -67,4 +68,8 @@ public class StatisRequestIdTimeComp {
             }
         },1,1, TimeUnit.SECONDS);
     }
+    @PreDestroy
+    public void destroy(){
+        service.shutdown();
+    }
 }