package com.scfenzhi.component;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
/**
* @Author: DaiYi
* @CreateTime 2021/9/1 13:58
* @Email: [email protected]
* @PhoneNumber: 18380924397
* @Description:
*/
@Component
public class Runner implements ApplicationRunner {
@Override
public void run(ApplicationArguments args) {
System.out.println("do something");
}
}
Execute a certain piece of code as soon as the SpringBoot project starts
Guess you like
Origin blog.csdn.net/daiyi666/article/details/120038502
Recommended
Ranking