[Spring Cloud] (汇总)网关(Gateway)与微服务(SringBoot)搭建

因之前的项目接触到了gateway网关,故根据自己的理解重新实现了一套网关组件。并计划持续更新,为实现一步步搭建网关。

每个阶段的博客均有对版本的代码如下:
杉极简/gateway网关阶段学习

版本选择

选择目前最新的SpringBoot2.6.13作为基础。

Spring Cloud Alibaba Version Spring Cloud Version Spring Boot Version
2021.0.5.0 Spring Cloud 2021.0.5 2.6.13

根据Spring Cloud的版本选择适合的中间件。

Spring Cloud Alibaba Version Sentinel Version Nacos Version RocketMQ Version Dubbo Version Seata Version
2021.0.5.0 1.8.6 2.2.0 4.9.4 ~ 1.6.1

博客进度

博客链接

Spring Cloud (1)gateway简单搭建与请求转发-CSDN博客

Spring Cloud (2)gateway全局异常捕捉统一返回值_gateway抓取异常-CSDN博客

Spring Cloud (3)gateway令牌token拦截器-CSDN博客

进展目录

原始的项目场景

最简单的配置,实现了Nacos配置、服务注册、网关转发微服务接口。

复制代码
fir_gateway_java_original

fir_nacos_original
全局异常捕捉

在原始项目的基础之上,实现全局异常捕捉,404处理,统一返回对象。

复制代码
h_exception/
	fir_gateway_java_exception
	fir_nacos_exception
	nacos配置
网关与令牌

网关集成redis与令牌校验器

微服务集成redis,AjaxResult,swagger,登录接口。

复制代码
i_token/
	fir_gateway_java_exception
	fir_nacos_exception
	nacos配置
相关推荐
txxzjmzlh1 天前
Alibaba Seata
spring cloud
Joy T2 天前
OpenClaw:个人 AI Agent 的运行架构、Skills 与工具管理
架构·gateway·plugin·channel·openclaw·agent runtime
喵个咪3 天前
RushWind Shop — 一笔订单的穿越:电商买路径上的每一道闸门
后端·微服务·rust
月光船幽幽3 天前
基线漂移破解:微服务测试一致性方案
python·科技·微服务
方便面不加香菜4 天前
Docker Compose 文件 -- docker-compose.yml
spring cloud·docker·容器
威嵌神州4 天前
NXP P2020核心板技术解析:PowerPC架构与VxWorks存量项目迁移指南
嵌入式硬件·微服务·云原生·架构
真上帝的左手5 天前
31. 占位-14
分布式·spring cloud·架构·系统架构
captain3766 天前
SpringCloud(12)-Gateway
spring boot·spring cloud·gateway
行百里er7 天前
【Spring Insight 技术分享】如何让 AI 解释失败也不拖垮控制台
后端·spring cloud·开源
YOU OU8 天前
项目实战知识点—在线oj项目
微服务