线程怎么整合到业务层的方法中去,在线等,着急,没做过

@SuppressWarnings("all")
@Service
public class TaskPlaybookInfoServiceImpl extends BaseServiceImpl<TaskPlaybookInfoEntity>
        implements TaskPlaybookInfoService, Runnable{

@Override
    public void run() {

    }

@Override
    public ResultVO<?> export(Long taskId,HttpServletResponse res) {

我在我的业务层实现了Runnable接口,并重写了run方法,我想把线程放在我的
export这个方法中,并返回此线程在执行时的一些相关信息。怎么实现啊!!!!!!!小弟,没做错过线程的,望哪位大佬指点指点啊!!!!在线等!!!很着急!!!!

用数据库表过度呗,controller层创建任务=》存储DB=》task扫描db加入多线程任务

你应该用 callbale

不用实现接口,在export中写

new Thread(new Runnable() {
            @Override
            public void run() {

            }
        }).start();

不调用接口怎么获取mybatis中查询出来的数据