{"id":14972980,"url":"https://github.com/javastacks/spring-boot-best-practice","last_synced_at":"2026-10-18T23:50:19.960Z","repository":{"id":37735168,"uuid":"156819424","full_name":"javastacks/spring-boot-best-practice","owner":"javastacks","description":"Spring Boot 最佳实践，已适配 Spring Boot 4.x，包括自动配置、核心原理、源码分析、国际化支持、调试、日志集成、热部署等。","archived":false,"fork":false,"pushed_at":"2026-03-08T02:49:50.000Z","size":428,"stargazers_count":5024,"open_issues_count":0,"forks_count":1358,"subscribers_count":98,"default_branch":"master","last_synced_at":"2026-03-08T06:58:18.068Z","etag":null,"topics":["java","spring","springboot"],"latest_commit_sha":null,"homepage":"https://www.javastack.cn/spring/spring-boot/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javastacks.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2018-11-09T06:23:18.000Z","updated_at":"2026-03-08T02:49:53.000Z","dependencies_parsed_at":"2024-12-24T12:06:06.584Z","dependency_job_id":"0c4bfff2-4236-493d-9bf7-43ad61eda570","html_url":"https://github.com/javastacks/spring-boot-best-practice","commit_stats":{"total_commits":120,"total_committers":2,"mean_commits":60.0,"dds":"0.17500000000000004","last_synced_commit":"c51b9ebaf78bbd60b19746b9d393c00544ecf428"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/javastacks/spring-boot-best-practice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javastacks%2Fspring-boot-best-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javastacks%2Fspring-boot-best-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javastacks%2Fspring-boot-best-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javastacks%2Fspring-boot-best-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javastacks","download_url":"https://codeload.github.com/javastacks/spring-boot-best-practice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javastacks%2Fspring-boot-best-practice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38343425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-18T02:00:06.448Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","springboot"],"created_at":"2024-09-24T13:47:52.728Z","updated_at":"2026-10-18T23:50:19.951Z","avatar_url":"https://github.com/javastacks.png","language":"Java","funding_links":[],"categories":["Java","教程系列"],"sub_categories":["文件同步"],"readme":"# spring-boot-best-practice\n\n[中文](./README.md) | English\n\n\u003e :rocket: This repository provides practical Spring Boot examples covering mainstream topics and real development scenarios.\n\u003e\n\u003e :star: This project will continue to be updated. To stay on track, please click **Star** in the upper-right corner.\n\n## :fire: Why Learn Spring Boot?\n\n\u003e This repository has been adapted to **Spring Boot 4.x**. The current baseline is **Spring Boot 4.0.3**, with **Spring Framework 7.x** and **Java 21**. \n\u003e\n\u003e All examples are built around real-world scenarios, making this repository suitable both for learning Spring Boot and for referencing Spring Boot 4.x upgrades and migrations.\n\nSpring has long been one of the most important frameworks in the Java ecosystem. It was once commonly used together with Struts2 and Hibernate as the classic SSH stack for Java Web development. Around 2013, it evolved alongside Spring MVC and MyBatis into the SSM stack, which became the mainstream Java Web development solution for many years.\n\n**To simplify the learning curve of the Spring ecosystem**, Spring Boot was introduced in 2014. It helps developers use Spring components more easily and efficiently. Spring Boot is built on top of Spring, Spring MVC, and related frameworks. It depends on those underlying frameworks rather than existing independently.\n\nLearning Spring Boot makes it easier to master core Spring components, and it is also the foundation for learning Spring Cloud and microservice architecture, **because Spring Cloud is built on top of Spring Boot**.\n\nSpring Boot reflects real enterprise demand. In job descriptions and interview skill lists for Java developers and architects, **Spring Boot is almost always a required skill**. If you want to become a qualified Java engineer and truly understand the Spring ecosystem, Spring Boot is a necessary step.\n\n## :pushpin: Module Overview\n\nThis repository uses a Maven multi-module structure and covers core Spring Boot capabilities, data access, messaging middleware, operations and governance, container deployment, and engineering practices. It is designed for both topic-based learning and module-based verification.\n\n| Module Name | Description |\n| --- | --- |\n| `spring-boot-quick-start` | Quick start and basic bootstrapping example for Spring Boot. |\n| `spring-boot-mail` | Email sending example with Spring Boot. |\n| `spring-boot-web` | Spring MVC web examples, including message conversion, interceptors, and servlet registration. |\n| `spring-boot-rest-services` | REST service call examples including RestTemplate, RestClient, WebClient, and more. |\n| `spring-boot-webflux` | Reactive development examples with Spring WebFlux and `WebClient`. |\n| `spring-boot-logging` | Logging system and logging configuration examples in Spring Boot. |\n| `spring-boot-test` | Spring Boot testing examples, including `MockMvc`, `MockBean`, and JSON tests. |\n| `javastack-spring-boot-starter` | Example of developing a custom Spring Boot Starter. |\n| `javastack-spring-boot-starter-sample` | Example of integrating and using the custom Starter. |\n| `spring-boot-properties` | Configuration file, property binding, and custom configuration class examples. |\n| `spring-boot-redis` | Redis integration, cache access, and common operation examples. |\n| `spring-boot-mongodb` | MongoDB integration and Spring Data MongoDB examples. |\n| `spring-boot-elasticsearch` | Elasticsearch integration and Spring Data Elasticsearch examples. |\n| `spring-boot-session` | Distributed session management examples with Spring Session. |\n| `spring-boot-jetty` | Example of using Jetty as the embedded web container. |\n| `spring-boot-docker` | Docker image building, layered packaging, and container deployment examples. |\n| `spring-boot-features` | Examples of common Spring Boot features and startup behavior. |\n| `spring-boot-application` | Application startup, async invocation, and application-level capability examples. |\n| `spring-boot-datasource` | Multi-datasource, Druid, and JDBC/JdbcClient data access examples. |\n| `spring-boot-jpa` | Spring Data JPA persistence examples. |\n| `spring-boot-activemq` | ActiveMQ integration examples. |\n| `spring-boot-rabbitmq` | RabbitMQ integration examples. |\n| `spring-boot-kafka` | Kafka integration examples. |\n| `spring-boot-cache` | Spring Cache abstraction and cache annotation examples. |\n| `spring-boot-mybatis` | MyBatis data access examples. |\n| `spring-boot-mybatis-plus` | MyBatis-Plus enhanced data access examples. |\n| `spring-boot-flyway` | Flyway database versioning and migration examples. |\n| `spring-boot-mapstruct` | Object mapping examples with MapStruct. |\n| `spring-boot-jasypt` | Configuration encryption and decryption examples with Jasypt. |\n| `spring-boot-knife4j` | Knife4j / OpenAPI integration examples for API documentation. |\n| `spring-boot-tinylog` | Tinylog logging framework integration examples. |\n| `spring-boot-admin-server` | Spring Boot Admin Server monitoring center example. |\n| `spring-boot-admin-client` | Spring Boot Admin Client integration example. |\n| `spring-boot-schedule` | Scheduled task examples with Spring scheduling. |\n| `spring-boot-quartz` | Quartz scheduler integration examples. |\n| `spring-boot-graalvm` | GraalVM / Native Image related examples. |\n| `spring-boot-war` | WAR packaging and external servlet container deployment examples. |\n| `spring-boot-actuator` | Actuator endpoints and application governance examples. |\n| `spring-boot-aop` | Spring AOP examples. |\n\n## :heart: Spring Boot Learning Materials\n\nHere is a complete set of **Spring Boot learning materials**, including underlying implementation principles and practical coding examples, designed to help you quickly master every major aspect of Spring Boot.\n\n**Contents include:**\n\n- Spring Boot Hello World\n- Returning JSON data with Spring Boot\n- Using alternative JSON libraries in Spring Boot\n- Global exception handling in Spring Boot\n- Connecting to a database with Spring Boot JPA\n- Configuring JPA in Spring Boot\n- Saving data with Spring Boot JPA\n- Saving data with Spring Boot JdbcTemplate\n- Common Spring Boot configuration\n- Static resource handling in Spring Boot\n- Scheduled tasks in Spring Boot\n- Invoking Beans from ordinary classes in Spring Boot\n- Using template engines in Spring Boot\n- Integrating JSP with Spring Boot\n- Integrating Servlets with Spring Boot\n- Integrating Filters and Listeners with Spring Boot\n- Using `HandlerInterceptor` in Spring Boot\n- Startup tasks with `CommandLineRunner`\n- Unit testing with Spring Boot\n- Reading system environment variables in Spring Boot\n- Using custom `properties` in Spring Boot\n- Changing the default package scanning path\n- Custom startup banners in Spring Boot\n- Importing Spring XML configuration files\n- Hot deployment in Spring Boot\n- Monitoring and managing production environments\n- Spring Boot Starter in depth\n- Version management in Spring Boot dependencies\n- File upload in Spring Boot\n- Integrating Redis cache with Spring Boot\n- Spring Cache in Spring Boot\n- Integrating Ehcache with Spring Boot\n- Distributed session sharing in Spring Boot\n- ......\n\n**A total of 108 pages, very comprehensive.**\n\n**How to get it:**\n\nThis tutorial is shared for free. Scan the QR code below and follow the **Java技术栈** WeChat public account:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://img.javastack.cn/18-11-16/79719805.jpg\"\u003e\n\u003c/p\u003e\n\nAfter following the account, send the keyword: **666** in the backend, and the public account will automatically deliver the materials to you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavastacks%2Fspring-boot-best-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavastacks%2Fspring-boot-best-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavastacks%2Fspring-boot-best-practice/lists"}