记录commandlinerunner错误解决
不研究原因只记录错
实现预先加载接口的时候commandlinerunner,运行后会报错failed to execute commandlinerunner;
所以加个for循环
@Component
@Order(value = 1)
public class YxRunner implements CommandLineRunner {@Value("${file.jtwjlj}")private String jtwjlj;@Autowiredprivate ISourceService sourceService;@Overridepublic void run(String... args) throws Exception {//这里加了个for循环,加上就不报错了int a = 10;for (int a1 = 0; a1 < a; a1++) {while (true) {//这里做处理流程即可try {Thread.sleep(5000);} catch (InterruptedException e) {throw new RuntimeException(e);}}}}}