转载自https://blog.csdn.net/k0307x1990y/article/details/90672129
@Component
public class TimingTaskController{
public static TimingTaskController timingTaskController;
@Autowired
private OrderService orderService;
@PostConstruct
public void init() {
timingTaskController = this;
timingTaskController.orderService = this.orderService;
}
//调用的时候
timingTaskController.orderService.方法
}