22 lines
660 B
Java
22 lines
660 B
Java
package com.ruoyi;
|
|
|
|
import com.ruoyi.schedule.ScheduleThread;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
@Component
|
|
public class MyStartupRunner implements CommandLineRunner {
|
|
|
|
@Autowired
|
|
private ScheduleThread scheduleThread;
|
|
|
|
@Override
|
|
public void run(String... args) throws Exception {
|
|
// 这里编写项目启动后要执行的方法逻辑
|
|
//System.out.println("项目启动成功后自动执行此方法");
|
|
// scheduleThread.startAllThread();
|
|
// scheduleThread.startAllThread2();
|
|
}
|
|
}
|