# springboot **Repository Path**: tangbo8722466/springboot ## Basic Information - **Project Name**: springboot - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-07-20 - **Last Updated**: 2026-01-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 个人SpringCloud项目 > 作者:唐波
> 邮箱:617192504@qq.com
> 仓库地址:https://gitee.com/tangbo8722466/springboot.git ## 一、整合分布式功能模块 * 基础组件:springboot-2.5.4 * 注册中心:springcloud-alibaba-nacos * 配置中心:springcloud-alibaba-nacos * 网关:springcloud-gateway * 认证服务:sa-token+jwt(待整合) * 服务调用:feign+loadbalancer+sentinel * 断路器:springcloud-alibaba-sentinel * 链路跟踪:skywalking(待整合) * 分布式事务:springcloud-alibaba-seata (待整合) * 服务监控:springboot-admin,Actuator * 数据加密:encrypt-sdk(AES+RSA+加签验签) ## 二、整合中间件服务 * 分布式文件系统:seaweedfs-java-client * 消息队列:rabbit-mq、kafka * 缓存:redis * 外部消息服务:dingtalk,邮件服务(待整合),短信服务(待整合) ## 三、整合存储服务 * ES:es-jpa(待整合),es-highclient (待整合) * 数据源读写分离:mybatis-plus * redis缓存: lettuce * Es:待整合 ## 四、springboot组件 * 日志组件:logback * 过滤器:全局、局部自定义 * 拦截器:Aop ## 五、模块服务配置说明 ### 5.1、springboot-gateway-service **模块说明:** 网关服务 * application-name: springboot-gateway-service * server-port:8090(http),8190(https) * context-path: /springboot-gateway/ ### 5.2、springboot-user-service **模块说明:** 用户服务 * application-name: springboot-user-service * server-port:8091 * context-path: /springboot-user/ ### 5.3、springboot-external-service **模块说明:** 外部服务调用,如调用seaweedfs、dingtalk服务 * application-name: springboot-external-service * server-port:8092 * context-path: /springboot-external/ ### 5.4、springboot-admin **模块说明:** 监控服务admin服务端 * application-name: springboot-admin * server-port:8089 * context-path: 无 ### 5.2、springboot-sa-token-service **模块说明:** sa-token服务 * application-name: springboot-sa-token-service * server-port:8093 * context-path: /springboot-sa-token/ ## 六、服务地址 ### 6.1、nacos地址信息 * 地址:http://10.1.20.110-112:8848/nacos/ * 登陆账号:nacos/nacos ### 6.2、sentinel地址信息 * 地址:http://10.1.20.112:8180/#/login * 登陆账号:sentinel/123456 ### 6.3、springboot-admin地址信息 * 地址:http://localhost:8089/ * 登陆账号:待配置 ## 七、服务认证逻辑 服务使用sa-token+jwt: * 认证成功后,token写入客户端cookie中 * 同源Cookie,请求将自动添加Cookie到Header中 模块认证逻辑: * 1、gateway认证:集成SaReactorFilter从cookie中获取token认证,认证失败,返回; * 2、gateway令牌转发:认证成功后,集成GlobalFilter将token添加到后续转发请求中的Header:x-access-token中; * 3、微服务模块服务认证:添加WebFilter,获取当前请求中Header:x-access-token中进行认证; * 4、Feign服务间调用:上游调用,Feign拦截器,将当前请求中Header:x-access-token,添加到服务调用的请求中;下游认证,参考《分发模块服务认证》; * 5、sa-token默认数据保存在内存中,分布式环境下认证信息无法共享,gateway和sa-token引入redis存储认证信息; * 6、为防止其他模块被迫引入redis,故微服务模块认证保持对当前请求中Header:x-access-token中进行认证的方式;