package com.fos.demo.quartz.task;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.fos.demo.mybatis.service.DemoUserService;

@Component
public class DemoQuartzTask {

    @Autowired
    private DemoUserService demoUserService;
    
    public void doTask(){
        
        Date date=new Date();
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
//        System.out.println("===============DemoQuartzTask START=====================");
//        System.out.println("DemoQuartzTask 获取用户信息："+demoUserService.getUser().getUserName());
        System.out.println("DemoQuartzTask 当前时间："+sdf.format(date));
//        System.out.println("===============DemoQuartzTask END=====================");
    }
}
