package com.example.timer;
import java.util.List;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.example.dao.FileMapper;
/**
* 定时器
* @author limstorm
* @create 2020-01-23 07:55:50
*/
@Component
public class TimerTask {
@Autowired
private FileMapper fileMapper;
public static TimerTask timerTask;
@PostConstruct
public void init() {
timerTask = this;
}
public void convertVideo() {
List<com.example.bean.File> fileList = timerTask.fileMapper.selectFileWithAllUserVideo();
}
}
Spring框架中,普通类调用service或mapper,报空指针的解决办法
猜你喜欢
转载自blog.csdn.net/qq_21479345/article/details/104108058
今日推荐
周排行