Spring boot 如何知道spring boot应用程序中正在运行的计划作业?
我们可以在Spring boot应用程序中使用@Scheduled轻松调度作业Spring boot 如何知道spring boot应用程序中正在运行的计划作业?,spring-boot,spring-scheduled,Spring Boot,Spring Scheduled,我们可以在Spring boot应用程序中使用@Scheduled轻松调度作业 是否有任何方法可以使用任何rest端点了解当前正在运行的计划作业?是的,您需要将Spring boot actuator作为依赖项之一。然后,您可以使用scheduledtasks端点检查计划任务: 只需将以下内容添加到pom.xml中 <dependency> <groupId>org.springframework.boot</groupId>
是否有任何方法可以使用任何rest端点了解当前正在运行的计划作业?是的,您需要将Spring boot actuator作为依赖项之一。然后,您可以使用scheduledtasks端点检查计划任务: 只需将以下内容添加到pom.xml中
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
org.springframework.boot
弹簧靴起动器执行器
端点在/exactor/scheduledtasks中可用它在spring boot 1.5.18.RELEASE中可用吗?它在1.5.18.RELEASE中可用。我相信是的,但路径的执行器部分是在2.0中引入的,因此,当您启动spring boot应用程序时,所有端点都应该在控制台中列出(从2.0开始,它们不再列出)。我记不起1.5.18的确切端点(我们现在的版本是2.17.RELEASE),但是如果您阅读控制台输出,您应该会发现它列在那里。