{"id":19446140,"url":"https://github.com/maciejwalkowiak/spring-boot-startup-report","last_synced_at":"2025-04-05T21:07:21.620Z","repository":{"id":145847571,"uuid":"611591731","full_name":"maciejwalkowiak/spring-boot-startup-report","owner":"maciejwalkowiak","description":"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.","archived":false,"fork":false,"pushed_at":"2024-01-14T14:57:34.000Z","size":377,"stargazers_count":449,"open_issues_count":2,"forks_count":23,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-29T19:07:52.520Z","etag":null,"topics":["java","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maciejwalkowiak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"maciejwalkowiak"}},"created_at":"2023-03-09T06:14:59.000Z","updated_at":"2025-03-24T23:52:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"91b1d926-2530-4c42-9e7a-747b5b728aff","html_url":"https://github.com/maciejwalkowiak/spring-boot-startup-report","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejwalkowiak%2Fspring-boot-startup-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejwalkowiak%2Fspring-boot-startup-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejwalkowiak%2Fspring-boot-startup-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maciejwalkowiak%2Fspring-boot-startup-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maciejwalkowiak","download_url":"https://codeload.github.com/maciejwalkowiak/spring-boot-startup-report/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399876,"owners_count":20932876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","spring-boot"],"created_at":"2024-11-10T16:13:03.894Z","updated_at":"2025-04-05T21:07:21.601Z","avatar_url":"https://github.com/maciejwalkowiak.png","language":"Java","funding_links":["https://github.com/sponsors/maciejwalkowiak"],"categories":["性能分析\u0026调优"],"sub_categories":["文件同步"],"readme":"# Spring Boot Startup Report\n\n**Spring Boot Startup Report** library generates an interactive Spring Boot application startup report that lets you understand \nwhat contributes to the application startup time and perhaps helps to optimize it.\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/maciejwalkowiak/spring-boot-startup-report)\n\n\n## 🤩 Highlights\n\n- startup report available in runtime as an interactive HTML page\n- generating startup reports in integration tests\n- flame chart\n- search by class or an annotation\n\nReport table lets you dig into the details of beans instantiation:\n\n![Report](docs/images/table.png)\n\nFlame graphs is a more visual representation of the data from the table:\n\n![Report](docs/images/flamechart.png)\n\n## ⚠️ Minimum Requirements\n\nTo use the library your project must use following versions\n\n- Java 8\n- Spring Boot 2.7+, 3.0+\n\n## ✨ How to use\n\n\u003e **Note** \n\u003e 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:\n\u003e ```\n\u003e \u003cdependency\u003e\n\u003e    \u003cgroupId\u003ecom.fasterxml.jackson.core\u003c/groupId\u003e\n\u003e    \u003cartifactId\u003ejackson-databind\u003c/artifactId\u003e\n\u003e  \u003c/dependency\u003e\n\u003e ```\n\n1. Add the dependency to `spring-boot-startup-report`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.maciejwalkowiak.spring\u003c/groupId\u003e\n    \u003cartifactId\u003espring-boot-startup-report\u003c/artifactId\u003e\n    \u003cversion\u003e0.2.0\u003c/version\u003e\n    \u003coptional\u003etrue\u003c/optional\u003e\n\u003c/dependency\u003e\n```\n\n2. Run application.\n\n3. Assuming application runs on port `8080`, go to `http://localhost:8080/startup-report`\n\n\u003e **Note**\n\u003e 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.\n\n## Using with integration tests\n\nWhen library is on the classpath, it also automatically generates startup reports for each application context started during running integration tests (tests annotated with `@SpringBootTest`). \nYou'll find them in `target/startup-reports` for Maven projects and in `build/startup-reports` for Gradle.\n\nFor 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.\n\n```java\n@Import(StartupEventsAutoConfiguration.class)\n@WebMvcTest(OwnerController.class)\npublic class OwnerControllerTests {\n    ...\n}\n```\n\nIf 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:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.maciejwalkowiak.spring\u003c/groupId\u003e\n    \u003cartifactId\u003espring-boot-startup-report\u003c/artifactId\u003e\n    \u003cversion\u003e0.2.0\u003c/version\u003e\n    \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nSounds good? Consider [❤️ Sponsoring](https://github.com/sponsors/maciejwalkowiak) the project! Thank you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciejwalkowiak%2Fspring-boot-startup-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaciejwalkowiak%2Fspring-boot-startup-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaciejwalkowiak%2Fspring-boot-startup-report/lists"}