CommandLineRunner的使用场景: 应用层加载json,xml,redis等数据

java

@Component
@Order(value = 1)
public class RoleStartRunner implements CommandLineRunner {
    private static AppDataProcessor processor = new AppDataProcessor();

    @Autowired
    private ProducerService producerService;


    @Override
    public void run(String... strings) throws Exception {
        ReadConditionByRedis.loadCrfMapping();
        List<String> keys = new ArrayList<>();
        keys.add("detail_schema");
        keys.add("etl_data_count");
        for (String key : keys){
            RedisUtil.deleteKey(key);
        }
        processor.addAllRole();
    }
}

上一篇:ubuntu中使用终端命令行快速查看torch.save保存的pth / pth.tar格式训练数据的方法


下一篇:2021-10-31