{"id":13458791,"url":"https://github.com/dunwu/spring-boot-tutorial","last_synced_at":"2025-04-06T18:15:06.302Z","repository":{"id":37107184,"uuid":"145809917","full_name":"dunwu/spring-boot-tutorial","owner":"dunwu","description":":100: :leaves: 通过丰富实例来展现 Spring Boot 特性的教程","archived":false,"fork":false,"pushed_at":"2024-01-27T15:23:50.000Z","size":14290,"stargazers_count":252,"open_issues_count":7,"forks_count":103,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T16:12:30.803Z","etag":null,"topics":["spring","spring-boot"],"latest_commit_sha":null,"homepage":"https://dunwu.github.io/spring-boot-tutorial/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dunwu.png","metadata":{"files":{"readme":"README.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}},"created_at":"2018-08-23T06:20:56.000Z","updated_at":"2025-03-03T06:17:53.000Z","dependencies_parsed_at":"2024-01-27T16:42:16.217Z","dependency_job_id":null,"html_url":"https://github.com/dunwu/spring-boot-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunwu%2Fspring-boot-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunwu%2Fspring-boot-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunwu%2Fspring-boot-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunwu%2Fspring-boot-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dunwu","download_url":"https://codeload.github.com/dunwu/spring-boot-tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526764,"owners_count":20953143,"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":["spring","spring-boot"],"created_at":"2024-07-31T09:00:57.394Z","updated_at":"2025-04-06T18:15:06.262Z","avatar_url":"https://github.com/dunwu.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://spring.io/projects/spring-boot\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n        \u003cimg src=\"http://dunwu.test.upcdn.net/common/logo/spring-boot.svg\" alt=\"spring-boot-logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://lbesson.mit-license.org/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"MIT license\"\u003e\n    \u003c/a\u003e\n    \u003cimg alt=\"Spring Boot Version\" src=\"https://img.shields.io/maven-central/v/org.springframework.boot/spring-boot-starter-parent/2.2.1.RELEASE?label=spring-boot\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/maven-v3.6.0-blue\" alt=\"maven\"\u003e\n    \u003ca href=\"https://travis-ci.com/dunwu/spring-boot-tutorial\"\u003e\u003cimg src=\"https://api.travis-ci.com/dunwu/spring-boot-tutorial.svg?branch=master\" alt=\"build\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eSpring Boot Tutorial\u003c/h1\u003e\n\n\u003e **`spring-boot-tutorial`** 是一个 Spring Boot 实战教程，通过大量丰富的示例，展示 Spring Boot 在各个应用领域的应用。本项目旨在覆盖 Java 应用的各领域。\n\u003e\n\u003e 本项目的源码使用 maven 进行构建管理，任意 maven module 都可以独立编译运行。\n\u003e\n\u003e - 🔁 项目同步维护：[Github](https://github.com/dunwu/spring-boot-tutorial/) | [Gitee](https://gitee.com/turnon/spring-boot-tutorial/)\n\u003e - 📖 电子书阅读：[Github Pages](https://dunwu.github.io/spring-boot-tutorial/) | [Gitee Pages](http://turnon.gitee.io/spring-boot-tutorial/)\n\n## 🔰 准备\n\n- [java-tutorial](https://dunwu.github.io/java-tutorial/) - java-tutorial 是一个全面的 Java 教程。如果你还不熟悉 Java 编程，学习 Spring Boot 之前，不妨先学习一下。\n- [spring-tutorial](https://dunwu.github.io/spring-tutorial/) - spring-tutorial 是一个 Spring 实战教程。Spring 是 Spring Boot 的基石，如果想更深入了解 SpringBoot，还是很有必要了解一下 Spring 框架机制。\n\n## 🎯 示例\n\n### Spring Boot 基础\n\n- [spring-boot-actuator](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/core/spring-boot-actuator) - 展示 Spring Boot 应用监控。\n- [spring-boot-aop](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/core/spring-boot-aop) - 展示 Spring Boot 中应用 AOP 编程。\n- [spring-boot-async](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/core/spring-boot-async) - 展示在 Spring Boot 中使用异步接口。\n- [spring-boot-banner](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/core/spring-boot-banner) - 展示在 Spring Boot 中定制启动时的输出 Logo。\n- [spring-boot-bean](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/core/spring-boot-bean) - 展示 Spring Boot 中应用 Lombok，简化大量的 getter、setter 、toString 等模板化代码；以及应用 Dozer 来简化大量的 JavaBean 互相转换代码。\n- [spring-boot-profile](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/core/spring-boot-profile) - 展示 Spring Boot 中根据 profile 使程序在不同的环境下执行不同的行为。\n- [spring-boot-property](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/core/spring-boot-property) - 全方位的演示 Spring Boot 加载属性的方式：记载 `properties` 和 `yaml` 两种文件；通过 `@Value`、`@ConfigurationProperties`、`Environment` 读取属性。\n\n### Spring Boot 访问存储\n\n#### 关系型数据库\n\n- [spring-boot-data-jdbc](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-jdbc) - 演示 Spring Boot + JDBC 访问关系型数据库，执行基本的 CRUD 操作。\n- [spring-boot-data-jdbc-multi-datasource](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-jdbc-multi-datasource) - 演示 Spring Boot + JDBC 访问多数据源（可以是多个数据库服务器，也可以是多个截然不同的数据库）。\n- [spring-boot-data-jpa](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-jpa) - 演示 Spring Boot + JPA 访问关系型数据库，支持基本的 CRUD 操作以及直接支持 REST 接口方式访问数据。\n- [spring-boot-data-mybatis-multi-datasource](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-mybatis-multi-datasource) - Spring Boot + Mybatis Plus 访问多数据源。\n- [spring-boot-data-mybatis-plus](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-mybatis-plus) - Spring Boot + Mybatis Plus 访问数据。\n- [spring-boot-data-flyway](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-flyway) - Spring Boot 中通过 flyway 控制 sql 版本。\n- [spring-boot-data-mybatis-sharding](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-mybatis-sharding) - Spring Boot + Mybatis Plus + ShardingSphere (sharding-jdbc) 访问分库分表数据。\n\n#### Nosql 数据库\n\n- [spring-boot-data-redis](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-redis) - 展示 Spring Boot 中访问 Redis。\n- [spring-boot-data-redis-cluster](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-redis-cluster) - 展示 Spring Boot 中访问 Redis 集群。\n- [spring-boot-data-mongodb](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-mongodb) - 展示 Spring Boot 中访问 MongoDB。\n- [spring-boot-data-elasticsearch](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-elasticsearch) - 展示 Spring Boot 中访问 elasticsearch 数据（TCP 方式访问 9300 服务端口）。\n- [spring-boot-data-elasticsearch-jest](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-elasticsearch-jest) - 展示 Spring Boot 中访问 elasticsearch 数据（HTTP 方式访问 9200 服务端口）。\n\n#### 缓存\n\n- [spring-boot-data-cache](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-cache) - 展示 Spring Boot 中如何使用简单的应用缓存。\n- [spring-boot-data-cache-j2cache](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-cache-j2cache) - 展示 Spring Boot + Jetcache 实现分布式二级缓存。\n- [spring-boot-data-cache-jetcache](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/data/spring-boot-data-cache-jetcache) - 展示 Spring Boot + J2Cache 实现分布式二级缓存。\n\n### Spring Boot 访问消息队列\n\n- [spring-boot-mq-activemq](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/mq/spring-boot-mq-activemq) - 展示 Spring Boot 中使用 ActiveMQ 作为消息队列。\n- [spring-boot-mq-kafka](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/mq/spring-boot-mq-kafka) - 展示 Spring Boot 中使用 Kafka 作为消息队列。\n- [spring-boot-mq-redis](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/mq/spring-boot-mq-redis) - 展示 Spring Boot 中使用 Redis 作为消息队列。\n\n### Spring Boot 集成安全框架\n\n- [spring-boot-security-authentication](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/security/spring-boot-security-authentication)\n- [spring-boot-security-checkcode](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/security/spring-boot-security-checkcode)\n- [spring-boot-security-session](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/security/spring-boot-security-session)\n\n### Spring Boot + Web\n\n- [spring-boot-web-fastjson](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-fastjson) - 展示 Spring Boot Web 应用中如何集成 Fastjson （默认的 JSON 库为 ）并定制序列化、反序列化方式。\n- [spring-boot-web-form](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-form) - 展示 Spring Boot Web 应用中表单如何提交、校验。\n- [spring-boot-web-helloworld](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-helloworld) - 展示 Spring Boot Web 应用的 Hello World 示例。\n- [spring-boot-web-helloworld](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-https) - 展示 Spring Boot 如何开发一个 HTTPS 应用。\n- [spring-boot-web-multi-connectors](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-multi-connectors) - 展示 Spring Boot Web 应用如何同时支持 HTTP 协议和 HTTPS 协议访问。\n- [spring-boot-web-ui](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-ui) - 展示 Spring Boot 和多种不同前端技术的交互。\n- [spring-boot-web-uploading](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-uploading) - 展示 Spring Boot Web 应用中如何支持文件上传下载服务。\n- [spring-boot-web-websocket](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/web/spring-boot-web-websocket) - 展示 Spring Boot Web 应用中如何运行 WebSocket，提供 3 种服务器的整合示例：Tomcat、Jetty、Undertow。\n\n### Spring Boot 使用模板引擎\n\n- [spring-boot-templ-jsp](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/template/spring-boot-templ-jsp) - 展示 Spring Boot Web 应用中如何运行 JSP，提供 2 种服务器的整合示例：Tomcat、 Jetty。\n- [spring-boot-tmpl-freemark](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/template/spring-boot-tmpl-freemark) - 展示 Spring Boot 中使用 Freemark 模板引擎。\n- [spring-boot-tmpl-thymeleaf](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/template/spring-boot-tmpl-thymeleaf) - 展示 Spring Boot 中使用 Thymeleaf 模板引擎。\n- [spring-boot-tmpl-velocity](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/template/spring-boot-tmpl-velocity) - 展示 Spring Boot 中使用 Velocity 模板引擎。\n\n### Spring Boot 集成各种框架\n\n- [spring-boot-docker](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-docker) - 展示 Spring Boot 如何通过 Docker 部署应用。\n- [spring-boot-logging](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-logging) - 展示 Spring Boot 集成日志组件。示例可以通过切换 profile 分别集成 logback、log4j2、log4j 三种日志库。\n- [spring-boot-mail](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-mail) - 展示 Spring Boot 中如何收发邮件。\n- [spring-boot-scheduler](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-scheduler) - 展示 Spring Boot 如何使用自带的调度器来执行简单的调度任务场景。\n- [spring-boot-scheduler-quartz](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-scheduler-quartz) - 展示 Spring Boot 集成 Quartz 来管理、调度较为复杂的调度任务场景。\n- [spring-boot-statemachine](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-statemachine) - 展示 Spring Boot 如何使用状态机控制工作流。\n- [spring-boot-swagger](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-swagger) - 展示 Spring Boot 集成 Swagger 来自动生成漂亮的 REST 接口在线文档。\n- [spring-boot-test-junit5](https://github.com/dunwu/spring-boot-tutorial/tree/master/codes/integration/spring-boot-test-junit5) - 展示 Spring Boot 中使用 JUnit5 进行单元测试。\n\n## 📖 文档\n\n### Spring Boot 基础篇\n\n- [SpringBoot 知识图谱](docs/10.Java/13.框架/02.SpringBoot/00.SpringBoot综合/01.SpringBoot知识图谱.md)\n- [SpringBoot 基本原理](docs/10.Java/13.框架/02.SpringBoot/00.SpringBoot综合/02.SpringBoot基本原理.md)\n\n### Spring Boot 基础篇\n\n- [SpringBoot 教程之快速入门](docs/10.Java/13.框架/02.SpringBoot/01.SpringBoot基础/01.SpringBoot之快速入门.md)\n- [SpringBoot 之属性加载](docs/10.Java/13.框架/02.SpringBoot/01.SpringBoot基础/02.SpringBoot之属性加载.md)\n- [SpringBoot 之 Profile](docs/10.Java/13.框架/02.SpringBoot/01.SpringBoot基础/03.SpringBoot之Profile.md)\n\n### Spring Boot 数据篇\n\n- [SpringBoot 之 JDBC](docs/10.Java/13.框架/02.SpringBoot/03.SpringBoot数据/01.SpringBoot之JDBC.md)\n- [SpringBoot 之 Mybatis](docs/10.Java/13.框架/02.SpringBoot/03.SpringBoot数据/11.SpringBoot之Mybatis.md)\n- [SpringBoot 之 Elasticsearch](docs/10.Java/13.框架/02.SpringBoot/03.SpringBoot数据/22.SpringBoot之Elasticsearch.md)\n- [SpringBoot 之 MongoDB](docs/10.Java/13.框架/02.SpringBoot/03.SpringBoot数据/23.SpringBoot之MongoDB.md)\n\n### Spring Boot IO 篇\n\n- [SpringBoot 之异步请求](docs/10.Java/13.框架/02.SpringBoot/04.SpringBootIO/01.SpringBoot之异步请求.md)\n- [SpringBoot 之 Json](docs/10.Java/13.框架/02.SpringBoot/04.SpringBootIO/02.SpringBoot之Json.md)\n- [SpringBoot 之邮件](docs/10.Java/13.框架/02.SpringBoot/04.SpringBootIO/03.SpringBoot之邮件.md)\n\n## License\n\n本博客所有文章除特别声明外，均采用 [![License: CC BY-NC-SA 4.0](https://licensebuttons.net/l/by-nc-sa/4.0/80x15.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/) 许可协议。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunwu%2Fspring-boot-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdunwu%2Fspring-boot-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunwu%2Fspring-boot-tutorial/lists"}