Backend Development 4 min read

How to Generate Interactive Spring Boot Startup Reports for Faster Apps

This guide explains how to add the spring-boot-startup-report library to a Spring Boot project, generate interactive HTML startup reports with bean details and flame graphs, view them during runtime or integration tests, and configure the dependency for production or test scopes.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
How to Generate Interactive Spring Boot Startup Reports for Faster Apps

Spring Boot Startup Report

The library generates an interactive HTML page that shows detailed startup information, bean instantiation, flame graphs, and allows searching by class or annotation.

Features

Interactive HTML page available at runtime

Generated during integration tests

Flame graph visualization

Search by class or annotation

The report table provides deep insight into bean creation.

Flame graph offers a more visual representation.

How to Use

Note: The report generation requires Jackson on the classpath. If you already have spring-boot-starter-web or spring-boot-starter-json , you are fine; otherwise add the Jackson dependency:
<code>&lt;dependency&gt;
    &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
    &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
&lt;/dependency&gt;
</code>

Add the

spring-boot-startup-report

dependency:

<code>&lt;dependency&gt;
    &lt;groupId&gt;com.maciejwalkowiak.spring&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-startup-report&lt;/artifactId&gt;
    &lt;version&gt;0.1.0&lt;/version&gt;
    &lt;optional&gt;true&lt;/optional&gt;
&lt;/dependency&gt;
</code>

Run the application and visit

http://localhost:8080/startup-report

.

Be aware the library depends on

org.springframework:spring-test

and

org.springframework.boot:spring-boot-test

; consider marking it as optional for production builds.

Using with Unit Tests

When on the classpath, the library automatically generates a startup report for each application context during integration tests annotated with @SpringBootTest. Reports are placed in

target/startup-reports

(Maven) or

build/startup-reports

(Gradle).

For test slices such as @WebMvcTest or @DataJpaTest, add

@Import(StartupEventsAutoConfiguration.class)

at the top of the test class:

<code>@Import(StartupEventsAutoConfiguration.class)
@WebMvcTest(OwnerController.class)
public class OwnerControllerTests {
    ...
}
</code>

If you only need test reports without a runtime endpoint, declare the dependency with

test

scope:

<code>&lt;dependency&gt;
    &lt;groupId&gt;com.maciejwalkowiak.spring&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-startup-report&lt;/artifactId&gt;
    &lt;version&gt;0.1.0&lt;/version&gt;
    &lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;
</code>
Javaperformancetestingspring-bootstartup-report
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.