package com.thhy.staff.config; import com.thhy.staff.modules.biz.face.controller.GetUserTask; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.context.annotation.Configuration; import java.util.Timer; @Configuration public class StartListener implements ApplicationRunner { @Value("${file.vfprefix}") private String vfPrefix; @Override public void run(ApplicationArguments args) throws Exception { GetUserTask gutask = new GetUserTask(vfPrefix); Timer timer = new Timer(); timer.schedule(gutask,1000,300000); } }