|
|
@@ -1,37 +1,131 @@ |
|
|
|
# Spring Boot Demo |
|
|
|
<h1 align="center"><a href="https://github.com/xkcoding" target="_blank">Spring Boot Demo</a></h1> |
|
|
|
<p align="center"> |
|
|
|
<a href="https://travis-ci.com/xkcoding/spring-boot-demo"><img alt="Travis-CI" src="https://travis-ci.com/xkcoding/spring-boot-demo.svg?branch=master"/></a> |
|
|
|
<a href="https://xkcoding.com"><img alt="author" src="https://img.shields.io/badge/author-Yangkai.Shen-blue.svg"/></a> |
|
|
|
<a href="https://www.oracle.com/technetwork/java/javase/downloads/index.html"><img alt="JDK" src="https://img.shields.io/badge/JDK-1.8.0_162-orange.svg"/></a> |
|
|
|
<a href="https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/html/"><img alt="Spring Boot" src="https://img.shields.io/badge/Spring Boot-2.1.0.RELEASE-brightgreen.svg"/></a> |
|
|
|
<a href="https://github.com/xkcoding/spring-boot-demo/blob/master/LICENSE"><img alt="LICENSE" src="https://img.shields.io/github/license/xkcoding/spring-boot-demo.svg"/></a> |
|
|
|
</p> |
|
|
|
|
|
|
|
[](https://travis-ci.com/xkcoding/spring-boot-demo) [](https://github.com/xkcoding/spring-boot-demo/blob/master/LICENSE) [](https://github.com/xkcoding/spring-boot-demo/stargazers) [](https://github.com/xkcoding/spring-boot-demo/fork) [](https://github.com/xkcoding/spring-boot-demo/watchers) |
|
|
|
<p align="center"> |
|
|
|
<a href="https://github.com/xkcoding/spring-boot-demo/stargazers"><img alt="star" src="https://img.shields.io/github/stars/xkcoding/spring-boot-demo.svg?label=Stars&style=social"/></a> |
|
|
|
<a href="https://github.com/xkcoding/spring-boot-demo/network/members"><img alt="star" src="https://img.shields.io/github/forks/xkcoding/spring-boot-demo.svg?label=Fork&style=social"/></a> |
|
|
|
<a href="https://github.com/xkcoding/spring-boot-demo/watchers"><img alt="star" src="https://img.shields.io/github/watchers/xkcoding/spring-boot-demo.svg?label=Watch&style=social"/></a> |
|
|
|
</p> |
|
|
|
|
|
|
|
spring boot demo 是一个用来学习 spring boot 的项目,总共包含 **`57`** 个集成demo,已经完成 **`47`** 个。包含集成 actuator(监控)、admin(可视化监控)、logback(日志)、aopLog(通过AOP记录web请求日志)、统一异常处理(json级别和页面级别)、freemarker(模板引擎)、thymeleaf(模板引擎)、Beetl(模板引擎)、Enjoy(模板引擎)、JdbcTemplate、JPA(ORM框架)、mybatis(ORM框架)、通用Mapper、PageHelper、mybatis-plus、BeetlSQL、upload(本地文件上传和七牛云文件上传)、redis(缓存)、ehcache(缓存)、email(发送各种类型邮件)、task(基础定时任务)、quartz(动态管理定时任务)、xxl-job(分布式定时任务)、swagger(API接口管理测试)、security(基于RBAC的动态权限认证)、Session共享、Zookeeper(结合AOP实现分布式锁)、RabbitMQ(消息队列)、websocket(服务端推送监控服务器运行信息)、socket.io(聊天室)、ureport2(中国式报表)、打包成war文件、集成 ElasticSearch(基本操作和高级查询)、Async(异步任务)、集成Dubbo(采用官方的starter)、MongoDB(文档数据库)、neo4j(图数据库)、docker(容器化)、JPA多数据源、Mybatis多数据源、代码生成器、GrayLog(日志收集)、JustAuth(第三方登录)。 |
|
|
|
<p align="center"> |
|
|
|
<span>中文 | <a href="./README.en.md">英文</a></span> |
|
|
|
</p> |
|
|
|
|
|
|
|
## 项目简介 |
|
|
|
|
|
|
|
`spring boot demo` 是一个用来深度学习并实战 `spring boot` 的项目,目前总共包含 **`57`** 个集成demo,已经完成 **`47`** 个。 |
|
|
|
|
|
|
|
该项目已成功集成 actuator(监控)、admin(可视化监控)、logback(日志)、aopLog(通过AOP记录web请求日志)、统一异常处理(json级别和页面级别)、freemarker(模板引擎)、thymeleaf(模板引擎)、Beetl(模板引擎)、Enjoy(模板引擎)、JdbcTemplate、JPA(ORM框架)、mybatis(ORM框架)、通用Mapper、PageHelper、mybatis-plus、BeetlSQL、upload(本地文件上传和七牛云文件上传)、redis(缓存)、ehcache(缓存)、email(发送各种类型邮件)、task(基础定时任务)、quartz(动态管理定时任务)、xxl-job(分布式定时任务)、swagger(API接口管理测试)、security(基于RBAC的动态权限认证)、Session共享、Zookeeper(结合AOP实现分布式锁)、RabbitMQ(消息队列)、websocket(服务端推送监控服务器运行信息)、socket.io(聊天室)、ureport2(中国式报表)、打包成war文件、集成 ElasticSearch(基本操作和高级查询)、Async(异步任务)、集成Dubbo(采用官方的starter)、MongoDB(文档数据库)、neo4j(图数据库)、docker(容器化)、JPA多数据源、Mybatis多数据源、代码生成器、GrayLog(日志收集)、JustAuth(第三方登录)。 |
|
|
|
|
|
|
|
> 如果大家还有想要集成的demo,也可在 [issue](https://github.com/xkcoding/spring-boot-demo/issues/new) 里提需求。我会额外添加在 [TODO](./TODO.md) 列表里。✊ |
|
|
|
|
|
|
|
### 分支 |
|
|
|
## 分支介绍 |
|
|
|
|
|
|
|
- master 分支:基于 SpringBoot 版本 2.1.0.RELEASE,每个 module 的 parent 依赖根目录下的pom.xml,主要用于管理每个module的依赖版本,方便大家学习 |
|
|
|
- v-1.5.x 分支:基于 SpringBoot 版本 1.5.8.RELEASE,每个 module 均依赖 spring-boot-demo-parent,有挺多同学们反映这种方式对新手不是很友好,运行起来有些难度,因此 ***此分支(v-1.5.x)会暂停开发维护*** ,所有内容会慢慢以 master 分支的形式同步过去,此分支暂未完成的,也会直接在master分支上加,在此分支学习的同学们,仍然可以在此分支学习,但是建议后期切换到master分支,会更加容易。🙂 |
|
|
|
- master 分支:基于 Spring Boot 版本 `2.1.0.RELEASE`,每个 Module 的 parent 依赖根目录下的 pom.xml,主要用于管理每个 Module 的通用依赖版本,方便大家学习。 |
|
|
|
- v-1.5.x 分支:基于 Spring Boot 版本 `1.5.8.RELEASE`,每个 Module 均依赖 spring-boot-demo-parent,有挺多同学们反映这种方式对新手不是很友好,运行起来有些难度,因此 ***此分支(v-1.5.x)会停止开发维护*** ,所有内容会慢慢以 master 分支的形式同步过去,此分支暂未完成的,也会直接在 master 分支上加,在此分支学习的同学们,仍然可以在此分支学习,但是建议后期切换到master分支,会更加容易。🙂 |
|
|
|
|
|
|
|
### 开发环境 |
|
|
|
## 开发环境 |
|
|
|
|
|
|
|
- **JDK1.8 +** |
|
|
|
- **JDK 1.8 +** |
|
|
|
- **Maven 3.5 +** |
|
|
|
- **IntelliJ IDEA ULTIMATE 2018.2 +** (注意:务必使用 IDEA 开发,同时保证安装 `lombok` 插件) |
|
|
|
- **mysql 5.7 +** (*尽量5.7版本以上,因为5.7版本加了一些新特性,不向下兼容。本demo里会尽量避免这种不兼容的地方,但还是建议尽量保证5.7版本以上*) |
|
|
|
- **IntelliJ IDEA ULTIMATE 2018.2 +** (*注意:务必使用 IDEA 开发,同时保证安装 `lombok` 插件*) |
|
|
|
- **Mysql 5.7 +** (*尽量保证使用 5.7 版本以上,因为 5.7 版本加了一些新特性,同时不向下兼容。本 demo 里会尽量避免这种不兼容的地方,但还是建议尽量保证 5.7 版本以上*) |
|
|
|
|
|
|
|
### 运行方式 |
|
|
|
## 运行方式 |
|
|
|
|
|
|
|
1. `git clone https://github.com/xkcoding/spring-boot-demo.git` |
|
|
|
2. 使用 IDEA 打开 clone 下来的项目 |
|
|
|
3. 在 IDEA 中打开项目 |
|
|
|
4. 在 IDEA 中 Maven Projects 的面板导入根目录下 的 `pom.xml` |
|
|
|
5. Maven Projects 找不到的童鞋,可以勾上 View -> Tool Buttons ,然后Maven Projects的面板就会出现在IDEA的右侧 |
|
|
|
6. 找到各个 module 的 Application 类就可以运行各个 module 了 |
|
|
|
7. PS:运行各个 module 之前,请先注意有些模块是需要先初始化数据库数据的。 |
|
|
|
4. 在 IDEA 中 Maven Projects 的面板导入项目根目录下 的 `pom.xml` 文件 |
|
|
|
5. Maven Projects 找不到的童鞋,可以勾上 IDEA 顶部工具栏的 View -> Tool Buttons ,然后 Maven Projects 的面板就会出现在 IDEA 的右侧 |
|
|
|
6. 找到各个 Module 的 Application 类就可以运行各个 demo 了 |
|
|
|
7. **`注意:每个 demo 均有详细的 README 配套,食用 demo 前记得先看看哦~`** |
|
|
|
8. **`注意:运行各个 demo 之前,有些是需要事先初始化数据库数据的,亲们别忘记了哦~`** |
|
|
|
|
|
|
|
### 开发计划 |
|
|
|
## 开发计划 |
|
|
|
|
|
|
|
查看 [TODO](./TODO.md) 文件 |
|
|
|
|
|
|
|
## 各 Module 介绍 |
|
|
|
|
|
|
|
| Module 名称 | Module 介绍 | |
|
|
|
| ------------------------------------------------------------ | ------------------------------------------------------------ | |
|
|
|
| [spring-boot-demo-helloworld](./spring-boot-demo-helloworld) | spring-boot 的一个 helloworld | |
|
|
|
| [spring-boot-demo-properties](./spring-boot-demo-properties) | spring-boot 读取配置文件中的内容 | |
|
|
|
| [spring-boot-demo-actuator](./spring-boot-demo-actuator) | spring-boot 集成 spring-boot-starter-actuator 用于监控 spring-boot 的启动和运行状态 | |
|
|
|
| [spring-boot-demo-admin-client](./spring-boot-demo-admin-client) | spring-boot 集成 spring-boot-admin 来可视化的监控 spring-boot 程序的运行状态,可以与 actuator 互相搭配使用,客户端示例 | |
|
|
|
| [spring-boot-demo-admin-server](./spring-boot-demo-admin-server) | spring-boot 集成 spring-boot-admin 来可视化的监控 spring-boot 程序的运行状态,可以与 actuator 互相搭配使用,服务端示例 | |
|
|
|
| [spring-boot-demo-logback](./spring-boot-demo-logback) | spring-boot 集成 logback 日志 | |
|
|
|
| [spring-boot-demo-log-aop](./spring-boot-demo-log-aop) | spring-boot 使用 AOP 切面的方式记录 web 请求日志 | |
|
|
|
| [spring-boot-demo-exception-handler](./spring-boot-demo-exception-handler) | spring-boot 统一异常处理,包括2种,第一种返回统一的 json 格式,第二种统一跳转到异常页面 | |
|
|
|
| [spring-boot-demo-template-freemarker](./spring-boot-demo-template-freemarker) | spring-boot 集成 Freemarker 模板引擎 | |
|
|
|
| [spring-boot-demo-template-thymeleaf](./spring-boot-demo-template-thymeleaf) | spring-boot 集成 Thymeleaf 模板引擎 | |
|
|
|
| [spring-boot-demo-template-beetl](./spring-boot-demo-template-beetl) | spring-boot 集成 Beetl 模板引擎 | |
|
|
|
| [spring-boot-demo-template-enjoy](./spring-boot-demo-template-enjoy) | spring-boot 集成 Enjoy 模板引擎 | |
|
|
|
| [spring-boot-demo-orm-jdbctemplate](./spring-boot-demo-orm-jdbctemplate) | spring-boot 集成 Jdbc Template 操作数据库,并简易封装通用 Dao 层 | |
|
|
|
| [spring-boot-demo-orm-jpa](./spring-boot-demo-orm-jpa) | spring-boot 集成 spring-boot-starter-data-jpa 操作数据库 | |
|
|
|
| [spring-boot-demo-orm-mybatis](./spring-boot-demo-orm-mybatis) | spring-boot 集成原生mybatis,使用 [mybatis-spring-boot-starter](https://github.com/mybatis/spring-boot-starter) 集成 | |
|
|
|
| [spring-boot-demo-orm-mybatis-mapper-page](./spring-boot-demo-orm-mybatis-mapper-page) | spring-boot 集成通用Mapper和PageHelper,使用 [mapper-spring-boot-starter](https://github.com/abel533/Mapper/tree/master/spring-boot-starter) 和 [pagehelper-spring-boot-starter](https://github.com/pagehelper/pagehelper-spring-boot) 集成 | |
|
|
|
| [spring-boot-demo-orm-mybatis-plus](./spring-boot-demo-orm-mybatis-plus) | spring-boot 集成 mybatis-plus,使用 [mybatis-plus-boot-starter](http://mp.baomidou.com/) 集成 | |
|
|
|
| [spring-boot-demo-orm-beetlsql](./spring-boot-demo-orm-beetlsql) | spring-boot 集成 beetl sql,使用 [beetl-framework-starter](http://ibeetl.com/guide/#beetlsql) 集成 | |
|
|
|
| [spring-boot-demo-upload](./spring-boot-demo-upload) | spring-boot 文件上传示例,包含本地文件上传以及七牛云文件上传 | |
|
|
|
| [spring-boot-demo-cache-redis](./spring-boot-demo-cache-redis) | spring-boot 整合 redis,操作redis中的数据,并使用redis缓存数据 | |
|
|
|
| [spring-boot-demo-cache-ehcache](./spring-boot-demo-cache-ehcache) | spring-boot 整合 ehcache,使用 ehcache 缓存数据 | |
|
|
|
| [spring-boot-demo-email](./spring-boot-demo-email) | spring-boot 整合 email,包括发送简单文本邮件、HTML邮件(包括模板HTML邮件)、附件邮件、静态资源邮件 | |
|
|
|
| [spring-boot-demo-task](./spring-boot-demo-task) | spring-boot 快速实现定时任务 | |
|
|
|
| [spring-boot-demo-task-quartz](./spring-boot-demo-task-quartz) | spring-boot 整合 quartz,并实现对定时任务的管理,包括新增定时任务,删除定时任务,暂停定时任务,恢复定时任务,修改定时任务启动时间,以及定时任务列表查询,`提供前端页面` | |
|
|
|
| [spring-boot-demo-task-xxl-job](./spring-boot-demo-task-xxl-job) | spring-boot 整合 xxl-job,并提供绕过 `xxl-job-admin` 对定时任务的管理的方法,包括定时任务列表,触发器列表,新增定时任务,删除定时任务,停止定时任务,启动定时任务,修改定时任务,手动触发定时任务 | |
|
|
|
| [spring-boot-demo-swagger](./spring-boot-demo-swagger) | spring-boot 集成原生的 swagger 用于统一管理、测试 API 接口 | |
|
|
|
| [spring-boot-demo-swagger-beauty](./spring-boot-demo-swagger-beauty) | spring-boot 集成第三方 swagger 美化API文档样式,用于统一管理、测试 API 接口 | |
|
|
|
| [spring-boot-demo-rbac-security](./spring-boot-demo-rbac-security) | spring-boot 集成 spring security 完成基于RBAC权限模型的权限管理,支持自定义过滤请求,动态权限认证,使用 JWT 安全认证,支持在线人数统计,手动踢出用户等操作 | |
|
|
|
| [spring-boot-demo-rbac-shiro](./spring-boot-demo-rbac-shiro) | spring-boot 集成 shiro 实现权限管理 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-session](./spring-boot-demo-session) | spring-boot 集成 Spring Session 实现Session共享、重启程序Session不失效 | |
|
|
|
| [spring-boot-demo-oauth](./spring-boot-demo-oauth) | spring-boot 实现 oauth 服务器功能,实现授权码机制 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-social](./spring-boot-demo-social) | spring-boot 集成第三方登录,集成 `justauth-spring-boot-starter` 实现QQ登录、GitHub登录、微信登录、谷歌登录、微软登录、小米登录、企业微信登录。 | |
|
|
|
| [spring-boot-demo-zookeeper](./spring-boot-demo-zookeeper) | spring-boot 集成 Zookeeper 结合AOP实现分布式锁 | |
|
|
|
| [spring-boot-demo-mq-rabbitmq](./spring-boot-demo-mq-rabbitmq) | spring-boot 集成 RabbitMQ 实现基于直接队列模式、分列模式、主题模式、延迟队列的消息发送和接收 | |
|
|
|
| [spring-boot-demo-mq-rocketmq](./spring-boot-demo-mq-rocketmq) | spring-boot 集成 RocketMQ,实现消息的发送和接收 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-mq-kafka](./spring-boot-demo-mq-kafka) | spring-boot 集成 kafka,实现消息的发送和接收 | |
|
|
|
| [spring-boot-demo-websocket](./spring-boot-demo-websocket) | spring-boot 集成 websocket,后端主动推送前端服务器运行信息 | |
|
|
|
| [spring-boot-demo-websocket-socketio](./spring-boot-demo-websocket-socketio) | spring-boot 使用 netty-socketio 集成 websocket,实现一个简单的聊天室 | |
|
|
|
| [spring-boot-demo-ureport2](./spring-boot-demo-ureport2) | spring-boot 集成 ureport2 实现复杂的自定义的中国式报表 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-uflo](./spring-boot-demo-uflo) | spring-boot 集成 uflo 快速实现轻量级流程引擎 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-urule](./spring-boot-demo-urule) | spring-boot 集成 urule 快速实现规则引擎 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-activiti](./spring-boot-demo-activiti) | spring-boot 集成 activiti 7 流程引擎 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-async](./spring-boot-demo-async) | spring-boot 使用原生提供的异步任务支持,实现异步执行任务 | |
|
|
|
| [spring-boot-demo-war](./spring-boot-demo-war) | spring-boot 打成 war 包的配置 | |
|
|
|
| [spring-boot-demo-elasticsearch](./spring-boot-demo-elasticsearch) | spring-boot 集成 ElasticSearch,集成 `spring-boot-starter-data-elasticsearch` 完成对 ElasticSearch 的高级使用技巧,包括创建索引、配置映射、删除索引、增删改查基本操作、复杂查询、高级查询、聚合查询等 | |
|
|
|
| [spring-boot-demo-dubbo](./spring-boot-demo-dubbo) | spring-boot 集成 Dubbo,分别为公共模块 `spring-boot-demo-dubbo-common`、服务提供方`spring-boot-demo-dubbo-provider`、服务调用方`spring-boot-demo-dubbo-consumer` | |
|
|
|
| [spring-boot-demo-mongodb](./spring-boot-demo-mongodb) | spring-boot 集成 MongoDB,使用官方的 starter 实现增删改查 | |
|
|
|
| [spring-boot-demo-neo4j](./spring-boot-demo-neo4j) | spring-boot 集成 Neo4j 图数据库,实现一个校园人物关系网的demo | |
|
|
|
| [spring-boot-demo-docker](./spring-boot-demo-docker) | spring-boot 容器化 | |
|
|
|
| [spring-boot-demo-multi-datasource-jpa](./spring-boot-demo-multi-datasource-jpa) | spring-boot 使用JPA集成多数据源 | |
|
|
|
| [spring-boot-demo-multi-datasource-mybatis](./spring-boot-demo-multi-datasource-mybatis) | spring-boot 使用Mybatis集成多数据源,使用 Mybatis-Plus 提供的开源解决方案实现 | |
|
|
|
| [spring-boot-demo-sharding-jdbc](./spring-boot-demo-sharding-jdbc) | spring-boot 使用 `sharding-jdbc` 实现分库分表,同时ORM采用 Mybatis-Plus | |
|
|
|
| [spring-boot-demo-tio](./spring-boot-demo-tio) | spring-boot 集成 tio 网络编程框架 <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-grpc](./spring-boot-demo-grpc) | spring-boot 集成grpc,配置tls/ssl,参见[ISSUE#5](https://github.com/xkcoding/spring-boot-demo/issues/5) <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-codegen](./spring-boot-demo-codegen) | spring-boot 集成 velocity 模板技术实现的代码生成器,简化开发 | |
|
|
|
| [spring-boot-demo-graylog](./spring-boot-demo-graylog) | spring-boot 集成 graylog 实现日志统一收集 | |
|
|
|
| spring-boot-demo-sso | spring-boot 集成 SSO 单点登录,参见 [ISSUE#12](https://github.com/xkcoding/spring-boot-demo/issues/12) <span style="color:pink;">待完成</span> | |
|
|
|
|
|
|
|
## License |
|
|
|
|
|
|
|
[MIT](http://opensource.org/licenses/MIT) |
|
|
|
|
|
|
|
Copyright (c) 2018 Yangkai.Shen |
|
|
|
|
|
|
|
## 项目趋势 |
|
|
|
|
|
|
|
[](https://starchart.cc/xkcoding/spring-boot-demo) |
|
|
|
|
|
|
|
## 附录 |
|
|
|
|
|
|
|
### 根目录下的 pom.xml |
|
|
|
|
|
|
|
```xml |
|
|
@@ -203,112 +297,38 @@ spring boot demo 是一个用来学习 spring boot 的项目,总共包含 **`5 |
|
|
|
</project> |
|
|
|
``` |
|
|
|
|
|
|
|
### 各 Module 介绍 |
|
|
|
|
|
|
|
| Module 名称 | Module 介绍 | |
|
|
|
| ------------------------------------------------------------ | ------------------------------------------------------------ | |
|
|
|
| [spring-boot-demo-helloworld](./spring-boot-demo-helloworld) | spring-boot 的一个 helloworld | |
|
|
|
| [spring-boot-demo-properties](./spring-boot-demo-properties) | spring-boot 读取配置文件中的内容 | |
|
|
|
| [spring-boot-demo-actuator](./spring-boot-demo-actuator) | spring-boot 集成 spring-boot-starter-actuator 用于监控 spring-boot 的启动和运行状态 | |
|
|
|
| [spring-boot-demo-admin-client](./spring-boot-demo-admin-client) | spring-boot 集成 spring-boot-admin 来可视化的监控 spring-boot 程序的运行状态,可以与 actuator 互相搭配使用,客户端示例 | |
|
|
|
| [spring-boot-demo-admin-server](./spring-boot-demo-admin-server) | spring-boot 集成 spring-boot-admin 来可视化的监控 spring-boot 程序的运行状态,可以与 actuator 互相搭配使用,服务端示例 | |
|
|
|
| [spring-boot-demo-logback](./spring-boot-demo-logback) | spring-boot 集成 logback 日志 | |
|
|
|
| [spring-boot-demo-log-aop](./spring-boot-demo-log-aop) | spring-boot 使用 AOP 切面的方式记录 web 请求日志 | |
|
|
|
| [spring-boot-demo-exception-handler](./spring-boot-demo-exception-handler) | spring-boot 统一异常处理,包括2种,第一种返回统一的 json 格式,第二种统一跳转到异常页面 | |
|
|
|
| [spring-boot-demo-template-freemarker](./spring-boot-demo-template-freemarker) | spring-boot 集成 Freemarker 模板引擎 | |
|
|
|
| [spring-boot-demo-template-thymeleaf](./spring-boot-demo-template-thymeleaf) | spring-boot 集成 Thymeleaf 模板引擎 | |
|
|
|
| [spring-boot-demo-template-beetl](./spring-boot-demo-template-beetl) | spring-boot 集成 Beetl 模板引擎 | |
|
|
|
| [spring-boot-demo-template-enjoy](./spring-boot-demo-template-enjoy) | spring-boot 集成 Enjoy 模板引擎 | |
|
|
|
| [spring-boot-demo-orm-jdbctemplate](./spring-boot-demo-orm-jdbctemplate) | spring-boot 集成 Jdbc Template 操作数据库,并简易封装通用 Dao 层 | |
|
|
|
| [spring-boot-demo-orm-jpa](./spring-boot-demo-orm-jpa) | spring-boot 集成 spring-boot-starter-data-jpa 操作数据库 | |
|
|
|
| [spring-boot-demo-orm-mybatis](./spring-boot-demo-orm-mybatis) | spring-boot 集成原生mybatis,使用 [mybatis-spring-boot-starter](https://github.com/mybatis/spring-boot-starter) 集成 | |
|
|
|
| [spring-boot-demo-orm-mybatis-mapper-page](./spring-boot-demo-orm-mybatis-mapper-page) | spring-boot 集成通用Mapper和PageHelper,使用 [mapper-spring-boot-starter](https://github.com/abel533/Mapper/tree/master/spring-boot-starter) 和 [pagehelper-spring-boot-starter](https://github.com/pagehelper/pagehelper-spring-boot) 集成 | |
|
|
|
| [spring-boot-demo-orm-mybatis-plus](./spring-boot-demo-orm-mybatis-plus) | spring-boot 集成 mybatis-plus,使用 [mybatis-plus-boot-starter](http://mp.baomidou.com/) 集成 | |
|
|
|
| [spring-boot-demo-orm-beetlsql](./spring-boot-demo-orm-beetlsql) | spring-boot 集成 beetl sql,使用 [beetl-framework-starter](http://ibeetl.com/guide/#beetlsql) 集成 | |
|
|
|
| [spring-boot-demo-upload](./spring-boot-demo-upload) | spring-boot 文件上传示例,包含本地文件上传以及七牛云文件上传 | |
|
|
|
| [spring-boot-demo-cache-redis](./spring-boot-demo-cache-redis) | spring-boot 整合 redis,操作redis中的数据,并使用redis缓存数据 | |
|
|
|
| [spring-boot-demo-cache-ehcache](./spring-boot-demo-cache-ehcache) | spring-boot 整合 ehcache,使用 ehcache 缓存数据 | |
|
|
|
| [spring-boot-demo-email](./spring-boot-demo-email) | spring-boot 整合 email,包括发送简单文本邮件、HTML邮件(包括模板HTML邮件)、附件邮件、静态资源邮件 | |
|
|
|
| [spring-boot-demo-task](./spring-boot-demo-task) | spring-boot 快速实现定时任务 | |
|
|
|
| [spring-boot-demo-task-quartz](./spring-boot-demo-task-quartz) | spring-boot 整合 quartz,并实现对定时任务的管理,包括新增定时任务,删除定时任务,暂停定时任务,恢复定时任务,修改定时任务启动时间,以及定时任务列表查询,`提供前端页面` | |
|
|
|
| [spring-boot-demo-task-xxl-job](./spring-boot-demo-task-xxl-job) | spring-boot 整合 xxl-job,并提供绕过 `xxl-job-admin` 对定时任务的管理的方法,包括定时任务列表,触发器列表,新增定时任务,删除定时任务,停止定时任务,启动定时任务,修改定时任务,手动触发定时任务 | |
|
|
|
| [spring-boot-demo-swagger](./spring-boot-demo-swagger) | spring-boot 集成原生的 swagger 用于统一管理、测试 API 接口 | |
|
|
|
| [spring-boot-demo-swagger-beauty](./spring-boot-demo-swagger-beauty) | spring-boot 集成第三方 swagger 美化API文档样式,用于统一管理、测试 API 接口 | |
|
|
|
| [spring-boot-demo-rbac-security](./spring-boot-demo-rbac-security) | spring-boot 集成 spring security 完成基于RBAC权限模型的权限管理,支持自定义过滤请求,动态权限认证,使用 JWT 安全认证,支持在线人数统计,手动踢出用户等操作 | |
|
|
|
| [spring-boot-demo-rbac-shiro](./spring-boot-demo-rbac-shiro) | <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-session](./spring-boot-demo-session) | spring-boot 集成 Spring Session 实现Session共享、重启程序Session不失效 | |
|
|
|
| [spring-boot-demo-oauth](./spring-boot-demo-oauth) | <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-social](./spring-boot-demo-social) | spring-boot 集成 JustAuth 实现 QQ、微信、GitHub 、谷歌、小米等第三方登录 | |
|
|
|
| [spring-boot-demo-zookeeper](./spring-boot-demo-zookeeper) | spring-boot 集成 Zookeeper 结合AOP实现分布式锁 | |
|
|
|
| [spring-boot-demo-mq-rabbitmq](./spring-boot-demo-mq-rabbitmq) | spring-boot 集成 RabbitMQ 实现基于直接队列模式、分列模式、主题模式、延迟队列的消息发送和接收 | |
|
|
|
| [spring-boot-demo-mq-rocketmq](./spring-boot-demo-mq-rocketmq) | <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-mq-kafka](./spring-boot-demo-mq-kafka) | spring-boot 集成 kafka,实现消息的发送和接收 | |
|
|
|
| [spring-boot-demo-websocket](./spring-boot-demo-websocket) | spring-boot 集成 websocket,后端主动推送前端服务器运行信息 | |
|
|
|
| [spring-boot-demo-websocket-socketio](./spring-boot-demo-websocket-socketio) | spring-boot 使用 netty-socketio 集成 websocket,实现一个简单的聊天室 | |
|
|
|
| [spring-boot-demo-ureport2](./spring-boot-demo-ureport2) | <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-uflo](./spring-boot-demo-uflo) | <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-urule](./spring-boot-demo-urule) | <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-activiti](./spring-boot-demo-activiti) | <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-async](./spring-boot-demo-async) | spring-boot 使用原生提供的异步任务支持,实现异步执行任务 | |
|
|
|
| [spring-boot-demo-war](./spring-boot-demo-war) | spring-boot 打成 war 包的配置 | |
|
|
|
| [spring-boot-demo-elasticsearch](./spring-boot-demo-elasticsearch) | spring-boot 集成 ElasticSearch,集成 `spring-boot-starter-data-elasticsearch` 完成对 ElasticSearch 的高级使用技巧,包括创建索引、配置映射、删除索引、增删改查基本操作、复杂查询、高级查询、聚合查询等 | |
|
|
|
| [spring-boot-demo-dubbo](./spring-boot-demo-dubbo) | spring-boot 集成 Dubbo,分别为公共模块 `spring-boot-demo-dubbo-common`、服务提供方`spring-boot-demo-dubbo-provider`、服务调用方`spring-boot-demo-dubbo-consumer` | |
|
|
|
| [spring-boot-demo-mongodb](./spring-boot-demo-mongodb) | spring-boot 集成 MongoDB,使用官方的 starter 实现增删改查 | |
|
|
|
| [spring-boot-demo-neo4j](./spring-boot-demo-neo4j) | spring-boot 集成 Neo4j 图数据库,实现一个校园人物关系网的demo | |
|
|
|
| [spring-boot-demo-docker](./spring-boot-demo-docker) | spring-boot 容器化 | |
|
|
|
| [spring-boot-demo-multi-datasource-jpa](./spring-boot-demo-multi-datasource-jpa) | spring-boot 使用JPA集成多数据源 | |
|
|
|
| [spring-boot-demo-multi-datasource-mybatis](./spring-boot-demo-multi-datasource-mybatis) | spring-boot 使用Mybatis集成多数据源,使用 Mybatis-Plus 提供的开源解决方案实现 | |
|
|
|
| [spring-boot-demo-sharding-jdbc](./spring-boot-demo-sharding-jdbc) | spring-boot 使用 `sharding-jdbc` 实现分库分表,同时ORM采用 Mybatis-Plus | |
|
|
|
| [spring-boot-demo-tio](./spring-boot-demo-tio) | spring-boot 集成 tio <span style="color:pink;">待完成</span> | |
|
|
|
| [spring-boot-demo-grpc](./spring-boot-demo-grpc) | spring-boot 集成grpc,配置tls/ssl,参见[ISSUE#5](https://github.com/xkcoding/spring-boot-demo/issues/5) | |
|
|
|
| [spring-boot-demo-codegen](./spring-boot-demo-codegen) | spring-boot 集成 velocity 模板技术实现的代码生成器,简化开发 | |
|
|
|
| [spring-boot-demo-graylog](./spring-boot-demo-graylog) | spring-boot 集成 graylog 实现日志统一收集 | |
|
|
|
| spring-boot-demo-sso | spring-boot 集成 SSO 单点登录,参见 [ISSUE#12](https://github.com/xkcoding/spring-boot-demo/issues/12) | |
|
|
|
|
|
|
|
# 官方提供的 starter 介绍 |
|
|
|
|
|
|
|
| Name | Description | |
|
|
|
| :------------------------------------- | :--------------------------------------- | |
|
|
|
| spring-boot-starter | The core Spring Boot starter, including auto-configuration support, logging and YAML. | |
|
|
|
| spring-boot-starter-actuator | Production ready features to help you monitor and manage your application. | |
|
|
|
| spring-boot-starter-amqp | are neat | |
|
|
|
| spring-boot-starter-aop | Support for aspect-oriented programming including spring-aop and AspectJ. | |
|
|
|
| spring-boot-starter-artemis | Support for “Java Message Service API” via Apache Artemis. | |
|
|
|
| spring-boot-starter-batch | Support for “Spring Batch” including HSQLDB database. | |
|
|
|
| spring-boot-starter-cache | Support for Spring’s Cache abstraction. | |
|
|
|
| spring-boot-starter-cloud-connectors | Support for “Spring Cloud Connectors” which simplifies connecting to services in cloud platforms like Cloud Foundry and Heroku. | |
|
|
|
| spring-boot-starter-data-elasticsearch | Support for the Elasticsearch search and analytics engine including spring-data-elasticsearch. | |
|
|
|
| spring-boot-starter-data-gemfire | Support for the GemFire distributed data store including spring-data-gemfire. | |
|
|
|
| spring-boot-starter-data-jpa | Support for the “Java Persistence API” including spring-data-jpa, spring-orm and Hibernate. | |
|
|
|
| spring-boot-starter-data-mongodb | Support for the MongoDB NoSQL Database, including spring-data-mongodb. | |
|
|
|
| spring-boot-starter-data-rest | Support for exposing Spring Data repositories over REST via spring-data-rest-webmvc. | |
|
|
|
| spring-boot-starter-data-solr | Support for the Apache Solr search platform, including spring-data-solr. | |
|
|
|
| spring-boot-starter-freemarker | Support for the FreeMarker templating engine. | |
|
|
|
| spring-boot-starter-groovy-templates | Support for the Groovy templating engine. | |
|
|
|
| spring-boot-starter-hateoas | Support for HATEOAS-based RESTful services via spring-hateoas. | |
|
|
|
| spring-boot-starter-hornetq | Support for “Java Message Service API” via HornetQ. | |
|
|
|
| spring-boot-starter-integration | Support for common spring-integration modules. | |
|
|
|
| spring-boot-starter-jdbc | Support for JDBC databases. | |
|
|
|
| spring-boot-starter-jersey | Support for the Jersey RESTful Web Services framework. | |
|
|
|
| spring-boot-starter-jta-atomikos | Support for JTA distributed transactions via Atomikos. | |
|
|
|
| spring-boot-starter-jta-bitronix | Support for JTA distributed transactions via Bitronix. | |
|
|
|
| spring-boot-starter-mail | Support for javax.mail. | |
|
|
|
| spring-boot-starter-mobile | Support for spring-mobile. | |
|
|
|
| spring-boot-starter-mustache | Support for the Mustache templating engine. | |
|
|
|
| spring-boot-starter-redis | Support for the REDIS key-value data store, including spring-redis. | |
|
|
|
| spring-boot-starter-security | Support for spring-security. | |
|
|
|
| spring-boot-starter-social-facebook | Support for spring-social-facebook. | |
|
|
|
| spring-boot-starter-social-linkedin | Support for spring-social-linkedin. | |
|
|
|
| spring-boot-starter-social-twitter | Support for spring-social-twitter. | |
|
|
|
| spring-boot-starter-test | Support for common test dependencies, including JUnit, Hamcrest and Mockito along with the spring-test module. | |
|
|
|
| spring-boot-starter-thymeleaf | Support for the Thymeleaf templating engine, including integration with Spring. | |
|
|
|
| spring-boot-starter-velocity | Support for the Velocity templating engine. | |
|
|
|
| spring-boot-starter-web | Support for full-stack web development, including Tomcat and spring-webmvc. | |
|
|
|
| spring-boot-starter-websocket | Support for WebSocket development. | |
|
|
|
| spring-boot-starter-ws | Support for Spring Web Services. | |
|
|
|
|
|
|
|
# License |
|
|
|
|
|
|
|
[MIT](http://opensource.org/licenses/MIT) |
|
|
|
### 官方提供的 starter 介绍 |
|
|
|
|
|
|
|
Copyright (c) 2018 Yangkai.Shen |
|
|
|
| Name | Description | |
|
|
|
| :------------------------------------- | :---------------------------------------------------------- | |
|
|
|
| spring-boot-starter | Spring Boot 核心包,包括自动装配,日志,以及YAML文件解析 | |
|
|
|
| spring-boot-starter-actuator | 帮助在生产环境下监控和管理 Spring Boot 应用 | |
|
|
|
| spring-boot-starter-amqp | Spring Boot 快速集成 RabbitMQ | |
|
|
|
| spring-boot-starter-aop | 提供切面编程特性,包含 spring-aop 和 AspectJ 依赖 | |
|
|
|
| spring-boot-starter-batch | 快速集成 Spring Batch 批处理框架,包括操作 HSQLDB 数据库 | |
|
|
|
| spring-boot-starter-cache | Support for Spring’s Cache abstraction. | |
|
|
|
| spring-boot-starter-data-elasticsearch | Spring Boot 快速集成 ElasticSearch 查询分析引擎 | |
|
|
|
| spring-boot-starter-data-jpa | Spring Boot 快速集成 JPA 操作数据库 | |
|
|
|
| spring-boot-starter-data-mongodb | Spring Boot 快速集成 MongoDB 非关系型数据库 | |
|
|
|
| spring-boot-starter-data-rest | Spring Boot 暴露数据库查询端点为 REST 服务 | |
|
|
|
| spring-boot-starter-data-solr | Spring Boot 快速集成 Solr 实现全文索引 | |
|
|
|
| spring-boot-starter-freemarker | 提供 FreeMarker 模板引擎 | |
|
|
|
| spring-boot-starter-groovy-templates | 提供 Groovy 模板引擎 | |
|
|
|
| spring-boot-starter-integration | 提供通用的集成 spring-integration 模块 | |
|
|
|
| spring-boot-starter-jdbc | 快速集成 JDBC 操作数据库 | |
|
|
|
| spring-boot-starter-jersey | 提供 Jersey 提供 RESTful 服务 | |
|
|
|
| spring-boot-starter-jta-atomikos | 集成 JTA Atomikos 实现分布式事务 | |
|
|
|
| spring-boot-starter-jta-bitronix | 集成 JTA Bitronix 实现分布式事务 | |
|
|
|
| spring-boot-starter-mail | 快速邮件集成 | |
|
|
|
| spring-boot-starter-mustache | 提供 Mustache 模板引擎 | |
|
|
|
| spring-boot-starter-redis | Spring Boot 快速集成 Redis | |
|
|
|
| spring-boot-starter-security | Support for spring-security. | |
|
|
|
| spring-boot-starter-social-facebook | Support for spring-social-facebook. | |
|
|
|
| spring-boot-starter-social-linkedin | Support for spring-social-linkedin. | |
|
|
|
| spring-boot-starter-social-twitter | Support for spring-social-twitter. | |
|
|
|
| spring-boot-starter-test | 提供通用单元测试依赖,包括 JUnit, Hamcrest , Mockito | |
|
|
|
| spring-boot-starter-thymeleaf | 提供 Thymeleaf 模板引擎,包括 Thymeleaf 的自动装配等 | |
|
|
|
| spring-boot-starter-velocity | 提供 Velocity 模板引擎 | |
|
|
|
| spring-boot-starter-web | 提供全栈的 web 开发特性,包括 Spring MVC 依赖和 Tomcat 容器 | |
|
|
|
| spring-boot-starter-websocket | Spring Boot 集成 WebSocket 功能 | |
|
|
|
| spring-boot-starter-ws | Spring Boot 集成 WebService 功能 | |