• Stars
    star
    362
  • Rank 117,671 (Top 3 %)
  • Language
    Java
  • License
    MIT License
  • Created over 1 year ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Spring Boot Startup Report library generates an interactive Spring Boot application startup report that lets you understand what contributes to the application startup time and perhaps helps to optimize it.

Spring Boot Startup Report

Spring Boot Startup Report library generates an interactive Spring Boot application startup report that lets you understand what contributes to the application startup time and perhaps helps to optimize it.

Open in Gitpod

🤩 Highlights

  • startup report available in runtime as an interactive HTML page
  • generating startup reports in integration tests
  • flame chart
  • search by class or an annotation

Report table lets you dig into the details of beans instantiation:

Report

Flame graphs is a more visual representation of the data from the table:

Report

⚠️ Minimum Requirements

To use the library your project must use following versions

  • Java 8
  • Spring Boot 2.7+, 3.0+

How to use

Note
The report generation depends on Jackson present on the classpath. If you already have spring-boot-starter-web or spring-boot-starter-json or any other dependency that brings Jackson - there is nothing to worry about, otherwise make sure to add this to your dependency list:

<dependency>
   <groupId>com.fasterxml.jackson.core</groupId>
   <artifactId>jackson-databind</artifactId>
 </dependency>
  1. Add the dependency to spring-boot-startup-report:
<dependency>
    <groupId>com.maciejwalkowiak.spring</groupId>
    <artifactId>spring-boot-startup-report</artifactId>
    <version>0.2.0</version>
    <optional>true</optional>
</dependency>
  1. Run application.

  2. Assuming application runs on port 8080, go to http://localhost:8080/startup-report

Note
This library has dependencies to org.springframework:spring-test and org.springframework.boot:spring-boot-test so most likely you don't want to include it to your production build and therefore we use it as an optional dependency.

Using with integration tests

When library is on the classpath, it also automatically generates startup reports for each application context started during running integration tests (tests annotated with @SpringBootTest). You'll find them in target/startup-reports for Maven projects and in build/startup-reports for Gradle.

For integration tests that do not use @SpringBootTest but @WebMvcTest, @DataJpaTest or any other test slice, add @Import(StartupEventsAutoConfiguration.class) on the top of the test class to enable generating report.

@Import(StartupEventsAutoConfiguration.class)
@WebMvcTest(OwnerController.class)
public class OwnerControllerTests {
    ...
}

If you need only to generate reports for tests, but do not need to have the report available in runtime under an endpoint, you can declare the dependency with a test scope:

<dependency>
    <groupId>com.maciejwalkowiak.spring</groupId>
    <artifactId>spring-boot-startup-report</artifactId>
    <version>0.2.0</version>
    <scope>test</scope>
</dependency>

Sounds good? Consider ❤️ Sponsoring the project! Thank you!

More Repositories

1

just

Magical 🪄 command line toolkit for developing 🍃 Spring Boot apps
310
star
2

wiremock-spring-boot

WireMock Spring Boot drastically simplifies testing HTTP clients in Spring Boot & Junit 5 based integration tests.
Java
217
star
3

implementing-ddd-with-spring-talk

Java
118
star
4

spring-boot-http-clients

Spring Boot HTTP Clients provides zero-boilerplate auto-configuration for WebClient and Spring 6 HTTP Interface based HTTP clients in a Spring Boot application.
Java
100
star
5

java-cli-project-template

Project template for bootstrapping Java & Picocli based CLI
Java
66
star
6

sinit

sinit - command line shiny Spring Boot project initialzer 🚀
Shell
60
star
7

servlet3-maven-archetype

Maven archetype for basic Servlet 3 based Java web application - no xml, Tomcat 7 ready
Java
56
star
8

yolo

Life's too short for running tests
Go
40
star
9

junit-drools

JUnit + JBoss Drools integration
Java
30
star
10

paseq-maven-plugin

Maven Plugin for running Maven goals and commands sequentially or in parallel
Java
26
star
11

performance-oriented-spring-data-jpa-talk

Java
22
star
12

spring-boot-thymeleaf-tailwindcss-sample

CSS
19
star
13

start-spring-io-default-maven-extension

Chrome extension that switches default build tool to Maven at start.spring.io
Makefile
18
star
14

vlad-cli

Command Line Interface to search Vlad's blog
JavaScript
17
star
15

java-plist-serializer

Java objects to plist serializer
Java
15
star
16

twitter-bird-extension

Tiny browser extension that brings back the actual twitter logo and gets rid of the Doge dog from the upper left corner
JavaScript
15
star
17

spring-cloud-stream-binder-sqs

Java
14
star
18

spring-boot-spring-amqp-java8-lombok-sample

Java
14
star
19

spring-docs-read-latest-extension

Chrome extension that adds link to latest Spring docs to older versions project references
JavaScript
13
star
20

link-shortener-spring-boot-demo

Simple Link Shortener application developed with Spring Boot, WebFlux, Redis
Java
8
star
21

troubleshooting-spring-boot-appplications-with-sentry

Java
7
star
22

jacoco-spring-boot-maven-plugin-sample

Java
5
star
23

dropbox-resource-spring-boot-starter

Spring Boot starter that auto-configures protocol resolver for resolving resources from Dropbox.
Java
5
star
24

todomvc-spring-boot

spring boot + angularjs = todomvc
JavaScript
5
star
25

spring-boot-openapi-client-generator-demo

Java
4
star
26

testcontainers-localstack

Java
4
star
27

reactor-sqs-poc

Reactor + AWS SQS Proof of Concept
Java
3
star
28

spring-framework-antora-docs

Spring Framework reference documentation with search
Handlebars
3
star
29

springboot-testcontainers-container-logs-demo

Java
3
star
30

aws-sam-spring-cloud-function-template

Java
2
star
31

maciejwalkowiak

2
star
32

cookiecutter-maven-template

Python
2
star
33

spring-for-graphql-talk

Java
2
star
34

spring-boot-hello-world

Java
2
star
35

assertj-generator

Java
2
star
36

java-samples

2
star
37

lombok-jackson-sample

Lombok @Value + Jackson Serialisation & Deserialisation Sample
Java
2
star
38

testcontainers-spring-rabbitmq-issue

Shell
1
star
39

create-react-app-mobx-sample

Create React App + React App Rewired Sample
JavaScript
1
star
40

spring-cloud-function-aws-sam-sample

Sample Spring Cloud Function application running on AWS deployed with AWS SAM
Java
1
star
41

spring-boot-ws-sample

Spring Boot & Spring WS sample project
Java
1
star
42

tutorials

HTML
1
star
43

spring-cloud-aws-textract-ocr-sample

Sample OCR application build on the top of Spring Boot, Spring Cloud AWS and AWS Textract
Java
1
star
44

spring-cloud-aws-sqs-jms-sample

Sample showing how to use Amazon SQS with Spring Cloud AWS and JMS
Java
1
star
45

ktor-testcontainers-flyway-sample

Kotlin
1
star
46

spring-boot-react

Spring Boot + create-react-app + Gradle + Yarn
Java
1
star
47

spring-boot-demo

Java
1
star
48

spring-boot-groovy-samples

Samples and snippets for quick hacking with Spring Boot & Groovy
JavaScript
1
star
49

github-actions-playground

1
star