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();
}
}
标签:xml,CommandLineRunner,String,keys,redis,private,add,new,public 来源: https://www.cnblogs.com/jxtpro/p/15507577.html