'How to disable @Scheduled while building a Spring-boot project
I'm working on a Spring-Boot project with Job Scheduling inside the project. I have job schedule class like this,
@Component
public class JobScheduleService {
@Scheduled(fixedDelay = 300000)
public void excutePaymentJob(){
// Do Something
}
}
While I'm building a project through "mvn clean install" command. The "excutePaymentJob()" function will be executed on a building process.
Is there anyway to disable this on a building phase ?
Thanks a lot !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
