Reputation: 877
I have a spring boot app that I upgraded from v2.2.x to now be v2.4.3.
I saw in their documentation that there is a new actuator endpoint of /startup
, however it does not exist when I start my app.
There is no special requirement according to their documentation here
I am using spring-boot-admin-starter-client
v2.4.3 which provides spring-boot-actuator
v2.4.3, and i even have management.endpoint.startup.enabled=true
in my application.properties file.
Has anyone else used this version of spring boot and gotten this actuator enpoint to work?
Upvotes: 1
Views: 2141
Reputation: 41
May be you are using BootstrapApplicationListener which build the application context again but ignores the previous applicationStartup, so it sets the default, this is a bug in spring-cloud-context:3.0.0
Upvotes: 0
Reputation: 12932
You need to tweak startup configuration:
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(DemoApplication.class);
app.setApplicationStartup(new BufferingApplicationStartup(1000));
app.run(args);
}
}
In application.properties:
management.endpoints.web.exposure.include=startup
If you want to visualize startup events check out this tool I made some months ago https://spring-boot-startup-analyzer.netlify.app/ (look at the configuration instructions as you need to enable CORS on this endpoint)
Upvotes: 4