//package com.whyc.schedule; // //import com.whyc.factory.ThreadPoolExecutorFactory; //import com.whyc.service.SNMPConnectService; //import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.scheduling.annotation.EnableScheduling; //import org.springframework.scheduling.annotation.Scheduled; //import org.springframework.stereotype.Component; // //@EnableScheduling //@Component //public class SNMPScheduleService { // // @Autowired // private SNMPConnectService service; // // /**数据4秒钟获取一次*/ // @Scheduled(cron = "0/4 * * * * ? ") // public void getAndSaveB247(){ // ThreadPoolExecutorFactory.getPoolExecutor().execute(()->{ // service.getAndSaveB247(); // }); // } // // @Scheduled(cron = "0/4 * * * * ? ") // public void getAndSaveA250(){ // ThreadPoolExecutorFactory.getPoolExecutor().execute(()->{ // service.getAndSaveA250(); // }); // } // //}