SpringBoot—CommandLineRunner或者ApplicationRunner接口(开机自启)

在使用SpringBoot构建项目时,我们通常有一些预先数据的加载。那么SpringBoot提供了一个简单的方式来实现: