SpringBoot 启动时执行任务的方法:CommandLineRunner
CommandLineRunner的作用平常开发中有可能需要实现在项目启动后执行的功能,SpringBoot提供的一种简单的实现方案就是添加一个类并实现CommandLineRunner接口,实现功能的代码放在实现的run方法中简单例子package org.springboot.sample.runner;import org.springframework.boot.CommandLi...
原创
2019-06-04 09:08:20 ·
460 阅读 ·
0 评论