[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配置
相关推荐
rocksun1 天前
Tigris对象存储正式开源MCP OIDC身份提供商
redis·安全·微服务
古城小栈1 天前
性能测试:JMeter 压测 Spring Boot 微服务
spring boot·jmeter·微服务
大猫和小黄1 天前
Windows环境下使用Nacos搭建若依(RuoYi)微服务版完整指南
windows·微服务·架构
Mr.Pascal1 天前
深度解读一下 springcloud 的 pom.xml 用到的标签
xml·spring boot·spring cloud
Roye_ack1 天前
【微服务 Day1】SpringCloud实战开发(Mybatis-plus + Docker)
spring cloud·docker·微服务·mybatis
拾忆,想起1 天前
Dubbo RPC 实战全流程:从零搭建高可用微服务系统
网络·网络协议·微服务·性能优化·rpc·架构·dubbo
没有bug.的程序员1 天前
SOA、微服务、分布式系统的区别与联系
java·jvm·微服务·架构·wpf·日志·gc
.hopeful.1 天前
Docker——初识
服务器·docker·微服务·容器·架构
梵得儿SHI1 天前
SpringCloud 核心组件精讲:OpenFeign 实战指南-服务调用优雅实现方案(含自定义拦截器、超时重试、LoadBalance 整合避坑)
spring boot·spring·spring cloud·负载均衡·openfeign的核心应用·微服务调用·熔断组件