我有一个spring boot应用程序,我从v2.2.x升级到现在的v2.4.3。
我在他们的文档中看到有一个新的/startup执行器端点,但是当我启动我的应用程序时,它并不存在。

根据他们的文档here,没有特殊要求
我使用的是spring-boot-admin-starter-client v2.4.3,它提供了spring-boot-actuator v2.4.3,我甚至在我的application.properties文件中有management.endpoint.startup.enabled=true。
还有没有其他人用过这个版本的spring boot并让这个执行器enpoint工作?
发布于 2021-02-26 08:18:00
您需要调整启动配置:
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(DemoApplication.class);
app.setApplicationStartup(new BufferingApplicationStartup(1000));
app.run(args);
}
}在application.properties中:
management.endpoints.web.exposure.include=startup如果您想可视化启动事件,请查看我几个月前开发的这个工具https://spring-boot-startup-analyzer.netlify.app/ (查看配置说明,因为您需要在此端点上启用CORS )
发布于 2021-03-29 16:53:30
您可能正在使用BootstrapApplicationListener,它再次构建应用程序上下文,但忽略了前面的applicationStartup,所以它设置了默认值,这是spring-cloud- context中的一个错误:3.0.0
https://stackoverflow.com/questions/66378139
复制相似问题