@Scheduled(cron="0 0 0 * * ?") //定时器每天0点开始接入数据 public Output getPrice(PriceInput priceInput) throws IOException, YaolingException, ParseException {
Thread ts = new Thread(new Runnable() {
@Override
public void run() {
你要运行的代码
}//线程
});//线程
ts.start(); //启动线程!!!!!记住这句,不能忘
return new Output(); //不管运行结果对不对,都先返回给前台一个操作成功的讯息,而让后台代码在线程中继续跑
}