可以通过实现CommandLineRunner接口或ApplicationRunner接口两种方式达到目的。
一、CommandLineRunner源码解读
使用示例
启动项目执行结果
二、ApplicationRunner源码解读
使用示例
可以通过实现CommandLineRunner接口或ApplicationRunner接口两种方式达到目的。
一、CommandLineRunner源码解读
使用示例
启动项目执行结果
二、ApplicationRunner源码解读
使用示例