springboot常用接口 注:实现接口的类需要加 @Componet 注释加入spring容器中才会生效。 CommandLineRunner 实现该接口,在程序启动完成时,会调用该接口的方法: run(String… args) ,有且一次。