|
@@ -12,7 +12,6 @@ import java.util.Objects;
|
|
|
import java.util.function.BiConsumer;
|
|
|
import java.util.function.BiFunction;
|
|
|
import java.util.stream.Collectors;
|
|
|
-import javax.annotation.PostConstruct;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.chelvc.framework.base.context.ApplicationContextHolder;
|
|
@@ -122,10 +121,11 @@ public class DefaultExportHandler implements ExportHandler {
|
|
|
this.redisTemplate.opsForValue().set(this.key(id), exporting, duration);
|
|
|
}
|
|
|
|
|
|
- @PostConstruct
|
|
|
+ @Override
|
|
|
public void initialize() {
|
|
|
// 初始化导出文件清理线程
|
|
|
ThreadUtils.run(() -> {
|
|
|
+ log.info("Export file cleaner running...");
|
|
|
while (!Thread.currentThread().isInterrupted()) {
|
|
|
try {
|
|
|
RedisContextHolder.tryLockAround("exporting:clear:lock", (Executor) this::clear);
|