package org.ta.pddserver.config;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
import org.ta.pddserver.service.impl.LogsPddIoImpl;
import org.ta.pddserver.utils.PddHttpTool;

@Slf4j
@Component
public class PddApplicationRunner implements ApplicationRunner {
    @Resource
    private LogsPddIoImpl logsPddIoImpl;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("注入注册PDD-HTTP 日志保存工具");
        PddHttpTool.setLogsToolService(logsPddIoImpl);
    }
}
