diff --git a/README.en.md b/README.en.md new file mode 100644 index 000000000..fae901560 --- /dev/null +++ b/README.en.md @@ -0,0 +1,334 @@ +
+ English | 中文 +
+ +## Introduction + +`spring boot demo ` is a project for learning and practice `spring boot`, with a total of `57` integrated demos, and `47` have been completed. + +The project has successfully integrated actuator (`monitoring`), admin (`visual monitoring`), logback (`log`), aopLog (`recording web request logs through AOP`), global exception handling (`json level and page level` ), freemarker (`template engine`), thymeleaf (`template engine`), Beetl (`template engine`), Enjoy (`template engine`), JdbcTemplate (`general JDBC operate database`), JPA (`powerful ORM framework `), mybatis (`powerful ORM framework`), Generic Mapper (`mybatis quick operation `), PageHelper (`powerful mybatis pagination plugin`), mybatis-plus (`mybatis quick operation`), BeetlSQL (`powerful ORM framework `), upload (`local file upload and qiniu cloud file upload`), redis (`cache`), ehcache (`cache`), email (`send various types of mail`), task (`basic scheduled tasks`), quartz (`dynamic management scheduled tasks`), xxl-job (`distributed scheduled tasks`), swagger (`API interface management and tests`), security (`RBAC-based Dynamic Rights Authentication`), SpringSession (`session sharing`), Zookeeper (`implement distributed locks by AOP`), RabbitMQ (`message queue`), Kafka (`message queue`), websocket (` server pushes the monitoring server status to front end `), socket.io (`chat room`), ureport2 (`Chinese-style report`), packaged into a `war` file, integrates ElasticSearch (`basic operations and advanced queries`), Async ( `asynchronous tasks`), integrated Dubbo (`with official starter`), MongoDB (`document database`), neo4j (`graph database`), docker (`container`), `JPA Multi-Datasource`, `Mybatis Multi-Datasource`, `code generator`', GrayLog (`log collection`), JustAuth (`third-party login`). + +> If you still have a demo that you want to integrate, you can also request it in [issue] (https://github.com/xkcoding/spring-boot-demo/issues/new). I will add it to the [TODO](./TODO.en.md) list.✊ + +## Branches + +- master: Based on the Spring Boot version `2.1.0.RELEASE`, the parent of each Module depends on the pom.xml in the root directory, which is mainly used to manage the generic dependencies' version of each Module. It's easier to learn this project. +- v-1.5.x: Based on the Spring Boot version `1.5.8.RELEASE`, each module depends on spring-boot-demo-parent. There are quite a few friends who report that this way is not very friendly to rookies and it is a little difficult to run this project, so ***The branch (v-1.5.x) will stop development and maintenance***, and all the content will be slowly synchronized to the master branch. If this branch is not completed yet in the TODO list, it will be added directly to the master branch. Everyone can still learn in this branch, but still suggest to switch to the master branch in the future. After all, the official has been upgraded to the Spring Boot version `2.x`. 🙂 + +## Environment + +- **JDK 1.8 +** +- **Maven 3.5 +** +- **IntelliJ IDEA ULTIMATE 2018.2 +** (*Note: Be sure to use IDEA and ensure that the `lombok` plugin is installed.*) +- **Mysql 5.7 +** (*Try to be sure to use version 5.7 or higher, because version 5.7 adds some new features and is not backward compatible. This project will try to avoid this incompatibility, but it is recommended to ensure 5.7 or higher.*) + +## Getting Started + +1. `git clone https://github.com/xkcoding/spring-boot-demo.git` +2. Open the cloned project using IDEA +3. Open the project in IDEA +4. Import the `pom.xml` file from the root of the project using the `Maven Projects` panel +5. If you can not find the `Maven Projects` panel, you can try to check `View -> Tool Buttons` on the top toolbar of IDEA and the `Maven Projects` panel will appear on the right side of IDEA. +6. 找到各个 Module 的 Application 类就可以运行各个 demo 了 +7. **`Note: Each demo has a detailed README file. Remember to check it before running the demo~`** +8. **`Note: Before running each demo, some need to initialize the database data beforehand, don't forget it~`** + +## Plan + +View the [TODO](./TODO.en.md) file + +## Introduction of each 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 实现权限管理 待完成 | +| [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 服务器功能,实现授权码机制 待完成 | +| [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,实现消息的发送和接收 待完成 | +| [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 实现复杂的自定义的中国式报表 待完成 | +| [spring-boot-demo-uflo](./spring-boot-demo-uflo) | spring-boot 集成 uflo 快速实现轻量级流程引擎 待完成 | +| [spring-boot-demo-urule](./spring-boot-demo-urule) | spring-boot 集成 urule 快速实现规则引擎 待完成 | +| [spring-boot-demo-activiti](./spring-boot-demo-activiti) | spring-boot 集成 activiti 7 流程引擎 待完成 | +| [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 网络编程框架 待完成 | +| [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) 待完成 | + +## License + +[MIT](http://opensource.org/licenses/MIT) + +Copyright (c) 2018 Yangkai.Shen + +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/xkcoding/spring-boot-demo.svg)](https://starchart.cc/xkcoding/spring-boot-demo) + +## Appendix + +### Pom.xml in the root directory + +```xml + + +