美文网首页
springboot初始化执行

springboot初始化执行

作者: DataSource | 来源:发表于2019-08-16 10:17 被阅读0次
import com.ocean.ybls.token.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@Component
@Order(1) 
public class MyApplicationRunner implements ApplicationRunner {
    @Autowired
    UserService service;
    @Override
    public void run(ApplicationArguments applicationArguments){
//        System.out.println(service.findUserById(""));
    }
}

相关文章

网友评论

      本文标题:springboot初始化执行

      本文链接:https://www.haomeiwen.com/subject/yxqfsctx.html