大麦项目技术架构

技术 说明 官网
Spring-Boot Web服务框架 https://spring.io/projects/spring-boot
Spring-Cloud 微服务框架 https://spring.io/projects/spring-cloud
Spring-Cloud-alibaba alibaba微服务框架 https://github.com/alibaba/spring-cloud-alibaba
Spring-Cloud-Gateway 微服务网关 https://spring.io/projects/spring-cloud-gateway
Nacos 服务注册中心 https://nacos.io/zh-cn/index.html
Sentinel 服务熔断 https://sentinelguard.io/zh-cn/
Log4j2 日志框架 https://github.com/apache/logging-log4j2
Mysql 数据库 https://www.mysql.com/
MyBatis-Plus ORM框架 https://baomidou.com
MyBatisGenerator 数据层代码生成器 http://www.mybatis.org/generator/index.html
AJ-Captcha 图形验证码 https://gitee.com/anji-plus/captcha
Kafka 消息队列 https://github.com/apache/kafka/
Redis 分布式缓存 https://redis.io/
Redisson 分布式Redis工具 https://redisson.org
Elasticsearch 搜索引擎 https://github.com/elastic/elasticsearch
LogStash 日志收集工具 https://github.com/elastic/logstash
Kibana 日志可视化查看工具 https://github.com/elastic/kibana
Nginx 静态资源服务器 https://www.nginx.com/
Docker 应用容器引擎 https://www.docker.com
Jenkins 自动化部署工具 https://github.com/jenkinsci/jenkins
Hikari 数据库连接池 https://github.com/brettwooldridge/HikariCP
JWT JWT登录支持 https://github.com/jwtk/jjwt
Lombok Java语言增强插件 https://github.com/rzwitserloot/lombok
Hutool Java工具类库 https://github.com/looly/hutool
Swagger-UI API文档生成工具 https://github.com/swagger-api/swagger-ui
Knife4j Swagger 增强框架 https://doc.xiaominfo.com
Hibernator-Validator 验证框架 http://hibernate.org/validator
XXL-Job 分布式定时任务框架 http://www.xuxueli.com/xxl-job
ShardingSphere 分库分表 https://shardingsphere.apache.org

提供的架构和组件设计

针对于分布式和微服务的项目来说,随着业务的发展,项目的数量上千个都是很正常的,但如何要把这些项目做好配置,做好架构设计,设计出组件库,都是要考虑的因素

既然组件库是要给其他服务提供使用,所以在设计时要考虑的细节非常的多,设计模式和高内聚低耦合的思想更加的重要,而且代码的健壮性和高效率的执行也是同样重要,而在大麦项目中,使用了SpringBoot的自动装配机制来设计组件库

除了组件库外,还有对异常的处理、数据的封装格式、多线程的使用等等也都要进行相应的封装设计,这些在项目中同样具备

image-fb7b1762

提供的业务流程

对于大麦项目来说,核心的业务就是用户选择节目然后进行购票功能了,项目中不仅完整了对整个业务流程的完整闭环,而且考虑到既然设计此项目是为了应对高并发的特点,那么在从业务的角度上也做了很多的优化设计

image-3c5dc1ae

企业级项目导航:⬅️ 02-项目介绍 | 03-大麦项目技术架构 | ➡️ 04-大麦项目业务示例