wangrong
2026-08-30 761e5c5fa871959f60e15c971c8d83f2b53d0af5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package io.dataease.traffic.starter;
 
import io.dataease.traffic.dao.mapper.CoreApiTrafficMapper;
import io.dataease.utils.LogUtil;
import jakarta.annotation.Resource;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
 
@Component
public class DeTrafficStarter implements ApplicationRunner {
 
    @Resource
    private CoreApiTrafficMapper coreApiTrafficMapper;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        try {
            coreApiTrafficMapper.cleanTraffic();
        } catch (Exception e) {
            LogUtil.error(e.getMessage(), new Throwable(e));
        }
    }
}