| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | |
| | | |
| | | Boolean taskFlag = false; |
| | | |
| | | //@Scheduled(cron = "0/2 * * * * ?") |
| | | @Scheduled(cron = "0/2 * * * * ?") |
| | | public void execute() throws Exception { |
| | | if(taskFlag == true){ |
| | | System.out.println("正在运行,强制退出-------》"); |