SCA SpringCloud SpringBoot版本对应表

数据来源:Spring Cloud Alibaba 官方 Wiki SpringBoot 3.3.4 之后 Spring Cloud Alibaba Version Spring Cloud Version Spring Boot Version 2025.1.0.0 2025.1.0 4.0.0 Spring Cloud Alibaba Version Spring Cloud Version Spring Boot Version 2025.0.0.0 2025.0.0 3.5.0 组件版本关系 每个 Spring Cloud Alibaba 版本及其自身所适配的各组件对应版本如下表所示: Spring Cloud Alibaba Version Sentinel Version Nacos Version RocketMQ Version SchedulerX Version Seata Version 2025.1.0.0 1.8.9 3.1.1 5.3.1 1.13.3 2.5.0 2025.0.0.0 1.8.9 3.0.3 5.3.1 1.13.1 2.5.0 依赖引入 <dependencyManagement> <dependencies> <!-- Spring Boot 版本统一管理 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>3.5.0</version> <type>pom</type> <scope>import</scope> </dependency> <!-- Spring Cloud 官方版本管理 --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>2025.0.0</version> <type>pom</type> <scope>import</scope> </dependency> <!-- Spring Cloud Alibaba 阿里生态统一版本 --> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-alibaba-dependencies</artifactId> <version>2025.0.0.0</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> SpringBoot 3.3.4 及以前 📌 新版本(Calendar Versioning,推荐使用) Spring Cloud Alibaba Spring Cloud Spring Boot 2023.0.3.2 2023.0.3 3.3.4 2023.0.3.0 2023.0.3 3.3.4 2023.0.1.0 2023.0.1 3.2.4 2023.0.0.0-RC1 2023.0.0 3.2.0 2022.0.0.0 2022.0.0 3.0.2 2022.0.0.0-RC2 2022.0.0-RC2 3.0.2 2022.0.0.0-RC1 2022.0.0-RC1 3.0.0 2021.0.6.2 2021.0.9 2.7.18 2021.0.6.0 2021.0.9 2.7.18 2021.0.5.0 2021.0.5 2.6.13 2021.0.4.0 2021.0.4 2.6.11 2021.0.1.0 2021.0.1 2.6.3 2021.1 2020.0.1 2.4.2 📌 旧版本(RELEASE 命名) Spring Cloud Alibaba Spring Cloud Spring Boot 2.2.10.RELEASE Hoxton.SR12 2.3.12.RELEASE 2.2.9.RELEASE Hoxton.SR12 2.3.12.RELEASE 2.2.8.RELEASE Hoxton.SR12 2.3.12.RELEASE 2.2.7.RELEASE Hoxton.SR12 2.3.12.RELEASE 2.2.6.RELEASE Hoxton.SR9 2.3.2.RELEASE 2.2.1.RELEASE Hoxton.SR3 2.2.5.RELEASE 2.2.0.RELEASE Hoxton.RELEASE 2.2.X.RELEASE 2.1.4.RELEASE Greenwich.SR6 2.1.13.RELEASE 2.1.2.RELEASE Greenwich 2.1.X.RELEASE 2.0.4.RELEASE ⛔ Finchley 2.0.X.RELEASE 1.5.1.RELEASE ⛔ Edgware 1.5.X.RELEASE ⛔ 表示已停止维护 ...

2026-02-28 10:39:46 AM · 2 分钟

微服务认证系统的架构梳理和面试应对 更新中 

技术栈:Spring Boot 3 · Spring Cloud Alibaba · OpenFeign · JWT · Gateway · Nacos 如何使用这份文档 面试讲项目,最忌讳从代码细节讲起。正确顺序是: 先讲它解决什么问题 → 再讲整体架构 → 然后按请求流程串一遍 → 最后应对深挖。 本文档按这个顺序组织。带 🎤 标记的引用框,是可以基本照着说的话术。 一、一句话概述(开场用) 🎤 我做了一套基于 Spring Cloud Alibaba 的微服务认证系统。它把「认证」这件事拆成三个角色:auth 服务负责签发令牌、网关负责统一校验令牌、各业务服务通过请求头拿到用户身份。整体用 JWT 做无状态认证,服务之间用 OpenFeign 通信,靠 Nacos 做服务发现。 关键词锚点(面试官会顺着这些追问,要准备好):无状态 JWT、网关统一鉴权、OpenFeign 远程调用、Nacos 服务发现、BCrypt 密码加密、职责分离。 二、它解决什么问题(讲动机) 背景:系统是微服务架构,有多个独立服务(auth、user-service、archive-service 等)。如果每个服务各自做一遍登录校验,会有两个问题: 重复:每个服务都写一遍鉴权逻辑,改规则要改很多处。 有状态难扩展:传统 session 存在单台服务器内存里,多实例之间不共享,扩容困难。 解决思路:「网关统一安检 + JWT 无状态令牌」。所有请求先经过网关校验令牌,业务服务不再重复鉴权;令牌本身自包含用户信息,验证只需用密钥本地验签,不依赖服务端存储。 🎤 类比机场:网关是安检口,严格查一次护照(验签);过了安检给你贴个写着身份的手环(请求头里的用户 id);后面登机口、免税店(各业务服务)只看手环,不再查护照。验签只做一次,业务服务零负担。 三、整体架构(讲骨架) 模块划分:项目是 Maven 多模块微服务,核心模块及职责如下。 模块 类型 职责 gateway 网关 所有请求入口;统一校验 JWT;按路由转发到后端服务 auth 认证服务 登录、注册;验密码;签发 JWT。自己不连数据库 user-service 业务服务 管理用户数据(tb_user 表的增删改查) archive-service 业务服务 档案业务;从请求头读取当前用户身份 api 契约模块 存放各服务的 Feign 接口声明 + 配套 DTO(被各服务依赖) common 基建底座 统一返回 Result、全局配置、ThreadLocal 用户上下文等 一个关键设计——auth 与 user-service 分离:auth 只管「认证动作」(验密码、发令牌),不碰数据库;它要用户数据时,通过 OpenFeign 远程调用 user-service 去查。user-service 只管「用户数据」,不掺和登录逻辑。 ...

2026-01-26 06:05:16 PM · 2 分钟

说一说登录这件麻烦事 更新中 

每个写过后端的人,迟早都要跟"登录"打一场硬仗。它看起来是个小功能——一个用户名、一个密码、一个按钮——但凡是真正做过的人都知道,这是整个系统里坑最深、改起来最痛、出事最致命的一块。 它麻烦,不是因为技术有多难,而是因为它卡在三方利益的正中间:用户想省事,产品想拉新,安全想严防死守。这三件事天然打架。你每往其中一边挪一寸,另外两边就开始喊疼。 这篇文章想把这件"麻烦事"摊开讲清楚:主流厂商现在都怎么做、每种做法烂在哪、未来可能怎么变,以及如果你今天就要动手,应该怎么落地。 一、先看战场:主流厂商现在都在用什么 如果你今天注册任何一个稍微正经点的 App,会发现登录方式早就不是"账号 + 密码"一条路了。现在的主流玩法大致可以分成五类。 1. 手机号 + 短信验证码 这是中国互联网的绝对统治者。点开微博、抖音、美团、拼多多,第一屏几乎清一色是"输入手机号 → 收验证码 → 进"。 它能赢,是因为它一次性解决了三个问题:手机号天然实名(运营商帮你做了 KYC)、不用记密码、注册和登录是同一个动作。对产品经理来说,这意味着注册转化率极高——少一个"设置密码"的步骤,就少漏一批用户。 代价是:你把身份的命脉,交给了运营商和短信通道。 2. 邮箱 + 密码 这是全球(尤其欧美)的默认范式。GitHub、Google、Notion、几乎所有 SaaS 都以邮箱为账号主体。 邮箱的好处是全球通用、跨国可用、不依赖运营商、可以承载找回流程。一个邮箱地址几乎就是你在互联网上的"主键"。坏处后面细说。 3. 第三方登录(OAuth / 社交登录) “用微信登录"“Sign in with Google"“Continue with Apple”——本质上是把身份认证外包给一个你已经信任的大平台。 它的杀手锏是:用户一次都不用输。点一下,授权,进去了。对开发者来说,你还省掉了自己存密码的风险(密码根本不经过你的服务器)。代价是你被绑在了平台生态上,而且用户的账号体系实际上不在你手里。 4. 魔法链接(Magic Link) 无密码的一种:你输入邮箱,系统给你发一封带一次性链接的邮件,点开即登录。Slack、Medium 早期都靠这个。 它把"记密码"这件事彻底删掉了,安全模型简单清晰。但它把整个登录体验的流畅度,押在了"邮件能不能秒到"上——而邮件这玩意,慢起来能慢到你怀疑人生。 5. Passkey / WebAuthn(通行密钥) 这是最新、也是各大厂商正在猛推的方向。Apple、Google、Microsoft 已经全面支持。它基于公私钥密码学,用你设备上的生物识别(指纹、Face ID)来完成认证,服务器端根本不存任何可被盗的密码。 这是目前公认"理论上最优"的方案,我们最后单独讲。 下面这张图,把这五种方式按"用户省心程度"和"安全强度"两个维度摆一摆,你能直观看到它们各自的生态位: graph TD A["登录方式光谱"] --> B["短信验证码省心高 / 安全中"] A --> C["邮箱密码省心低 / 安全中"] A --> D["第三方登录省心高 / 安全中高"] A --> E["魔法链接省心中 / 安全中"] A --> F["Passkey省心高 / 安全高"] B --> B1["依赖运营商换号即失联"] C --> C1["密码要记容易被撞库"] D --> D1["绑死大平台账号不在自己手里"] E --> E1["押注邮件时效慢到怀疑人生"] F --> F1["体验最好但迁移设备是痛点"] style A fill:#1a1a2e,color:#fff style F fill:#16213e,color:#7fff7f 二、麻烦的本质:每一种方式都在某处偷偷塌方 上面每种方式听起来都还行,但它们都有一个藏在水面下的塌方点。用户平时感觉不到,一旦踩中,体验直接归零。 ...

2025-12-26 03:56:40 PM · 2 分钟

Spring Boot 常用代码片段 更新中 

通用 依赖管理 父 pom.xml 固定三版本管控 版本参考 <dependencyManagement> <dependencies> <!-- 1. SpringBoot 基础版本 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>3.5.0</version> <type>pom</type> <scope>import</scope> </dependency> <!-- 2. Spring Cloud 云原生基础 --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>2025.0.0</version> <type>pom</type> <scope>import</scope> </dependency> <!-- 3. Spring Cloud Alibaba 阿里全套依赖核心(关键!) --> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-alibaba-dependencies</artifactId> <version>2025.0.0.0</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> 启动类 @MapperScan("asia.liminality.user.mapper") @SpringBootApplication @Slf4j public class UserApplication { public static void main(String[] args) throws UnknownHostException { ConfigurableApplicationContext app = SpringApplication.run(UserApplication.class, args); Environment env = app.getEnvironment(); String protocol = "http"; if (env.getProperty("server.ssl.key-store") != null) { protocol = "https"; } log.info("--/\n---------------------------------------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}\n\t" + "External: \t{}://{}:{}\n\t" + "Profile(s): \t{}" + "\n---------------------------------------------------------------------------------------", env.getProperty("spring.application.name"), protocol, env.getProperty("server.port"), protocol, InetAddress.getLocalHost().getHostAddress(), env.getProperty("server.port"), env.getActiveProfiles()); } } domain DTO Result import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class Result<T> { private int code; private String message; private T data; public static <T> Result<T> success(T data) { return new Result<>(200, "success", data); } public static <T> Result<T> success() { return new Result<>(200, "success", null); } public static <T> Result<T> failure(String message) { return new Result<>(500, message, null); } public static <T> Result<T> failure(int code, String message) { return new Result<>(code, message, null); } public static <T> Result<T> failure(String message, T data) { return new Result<>(500, message, data); } } Spring Cloud Gateway AuthGlobalFilter @Slf4j @RequiredArgsConstructor @Component public class AuthGlobalFilter implements GlobalFilter, Ordered { private final JwtUtil jwtUtil; private static final List<String> WHITE_LIST = List.of( "/auth/user/login", "/auth/user/register" ); // 判断是否在白名单内 private boolean isWhiteList(String path){ return WHITE_LIST.stream().anyMatch(path::startsWith); } private Mono<Void> reject(ServerWebExchange exchange){ exchange.getResponse().setStatusCode(HttpStatus.UNAUTHORIZED); return exchange.getResponse().setComplete(); } @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { ServerHttpRequest request = exchange.getRequest(); String path = request.getPath().toString(); if (isWhiteList(path)) { return chain.filter(exchange); } String token = request.getHeaders().getFirst("Authorization"); // 令牌为空,拒绝访问 if( token == null || token.isEmpty() ){ return reject( exchange ); } // 验证令牌 try { Integer userId = jwtUtil.parseToken(token); // TODO userId 塞入请求头 log.info("🚪 塞入请求头"); } catch (Exception e) { return reject(exchange); } return chain.filter( exchange ); } // 过滤器优先级,越小越靠前 @Override public int getOrder() { return -1; } }

2025-11-26 09:51:37 AM · 2 分钟

突发性耳聋治疗过程

9月22日 星期一 DAY 1 突然患病 早上起床右耳耳朵闷,左耳正常。以为就是耳朵堵,中耳炎之类,会自然恢复,没太留意。 9月23日 星期二 DAY 2 这一天发现耳朵除了闷以外,听外界说话还有回声,感觉事情不太对。但是依然没有往严重方向上想,上班要紧。 9月25日 星期四 DAY4 看了很多视频,感觉可能是突发性耳聋。决定第二天去医院。此时已经错过了网上流传的所谓“72小时”黄金时间。 9月27日 星期六 DAY6 医院诊断 上午去南京中西医结合医院诊断。医生说考虑是一个突发性耳聋。一直很纠结医生说的“考虑说”是啥意思?他自己也不确定吗? 医生说要吃药,目前只是低频下降明显,不算特别严重。 后来开了一些药,要我遵循医嘱去吃,并且要放松自己,按时睡觉,健康生活。 这一天我进行了充足的睡眠。 9月28日 星期日 DAY6 早上醒来后,发现耳朵闷好像有所缓解,但是右耳明显耳鸣,一直有那种地铁经过的声音,但是音量不算太大。 9月30日 星期二 DAY9 早上醒来后,突然发现两个耳朵都听力下降了。缓了一会儿发现左耳好了,右耳还是老样子。把我吓得不轻。 感觉听力没有明显的好转。但是闷闷的感觉似乎有改善。 右耳有点感觉,好像是药物起作用了,不确定。 10月8日 星期三 从这一天开始耳鸣变得明显。耳鸣的声音感觉在400-500Hz左右会一直持续。 病情没有一丝好转。 10月9日 星期四 我到南京江苏人民医院再次进行耳部检查。本次检查后,进行了输液。 10月10日 第二次挂水。今日症状仍无任何缓解。 10月11日 第三次挂水。症状未减轻。中低音耳鸣明显,伴随地铁列车嗖嗖经过的声音。 10月12日 第四次挂水。 10月13日 当晚因工作忙碌未挂水。 10月14日 到医院复查,发现右耳听力几乎恢复正常(右耳进入25db及格线内)。开了药继续吃。 11月21日 突聋发作已29天,距初次治疗已24天 中低音耳鸣明显减弱,几乎听不到。现在听到的是音量很低的收音机调不到台的噪音。125Hz、250Hz的声音听到的音量有较小差异。右耳对125Hz、250Hz(或者就直接说是250Hz以下)的声音的听力没有左耳好,且伴随明显的音调变化。500Hz及以上左右耳几乎一致,但依然伴随微弱的音调变化。 10月23日 明显好转,右耳几乎听不到任何噪音,也没有耳鸣现象。目前和左耳的唯一区别就是125hz-500hz区间听力有微弱下降,伴随音调变化。 11月12日 距离突发性耳聋发作已经51天,距离突发性耳聋初次治疗已经46天。目前右耳和左耳比125hz有5db的差距,250hz有10db的差距,其他频段几乎没有差别。在打电话时,用右耳明显有复听现象。一般生活,和之前相比,没有明显感觉到复听。

2025-11-12 12:24:27 PM · 1 分钟

PostgreSQL和java的LocalDateTime不兼容的问题 更新中 

Java 的 LocalDateTime 和 PostgreSQL 的时间类型,“说的不是同一种时间”。 先搞清楚 PostgreSQL 的两种时间类型 TIMESTAMP → 不带时区,就是个裸时间 "2026-06-25 10:00:00" TIMESTAMPTZ → 带时区,内部存 UTC,查询时按会话时区转换 Java 这边 LocalDateTime → 没有时区概念,就是个裸时间 ZonedDateTime → 带时区 OffsetDateTime → 带偏移量(如 +08:00) Instant → UTC 时间戳 为什么会报错 PostgreSQL JDBC 驱动(特别是新版本 42.x+)对类型匹配非常严格: flowchart TD A[Java LocalDateTime] --> B[JDBC驱动] B --> C{PostgreSQL列类型} C -->|TIMESTAMP| D[✅ 可以匹配] C -->|TIMESTAMPTZ| E[❌ 类型不匹配报错] 你的列如果是 TIMESTAMPTZ(带时区),但 Java 传的是 LocalDateTime(无时区),驱动不知道该用哪个时区换算,就直接拒绝了。 常见的三种报错 Cannot convert LocalDateTime to TIMESTAMPTZ Bad value for type timestamp/date column is of type timestamp with time zone but expression is of type timestamp 解决方案 方案一:改 Java 类型(推荐) ...

2025-10-25 12:55:49 PM · 1 分钟

Swagger2和Swagger3注解对比表 更新中 

在 Spring Boot 生态中,Swagger 2.0(通常使用 Foxfire 依赖)和 Swagger 3.0(通常使用 Springdoc-openapi 依赖,基于 OpenAPI 3 规范)的注解发生了很大变化。 以下是 Swagger 2.0 与 Swagger 3.0(OpenAPI 3)的常用注释完整对应表: 1. 核心注解对应表 功能描述 Swagger 2.0 注解 (io.swagger.annotations) Swagger 3.0 注解 (io.swagger.v3.oas.annotations) 备注说明 标记控制器类 @Api(tags = "用户接口") @Tag(name = "用户接口") 3.0 中移除了 description 属性,统一使用 name 标记接口方法 @ApiOperation(value = "获取用户") @Operation(summary = "获取用户") 3.0 中 value 变更为 summary 入参实体类 @ApiModel(value = "用户对象") @Schema(description = "用户对象") 3.0 极大简化,统一使用 @Schema 实体类属性 @ApiModelProperty(value = "姓名") @Schema(description = "姓名") 同上,合并为了 @Schema 忽略某个属性 @ApiModelProperty(hidden = true) @Schema(hidden = true) 忽略整个类/方法 @ApiIgnore @Hidden 用于不想暴露在文档中的接口或参数 2. 请求参数注解对应表 对于方法入参(如 URL 路径参数、Query 参数等),3.0 引入了更具结构化的配置: ...

2025-09-25 09:06:35 AM · 1 分钟

程序员快速参考小手册 更新中 

有的命令一个月可能就用那么几次,不写手册里谁能记得住啊 VSCode 解决 code-runner Java Output 乱码 "code-runner.executorMap": { "javascript": "node", "java": "\"C:/Program Files/Java/jdk-17/bin/java.exe\" -Dfile.encoding=UTF-8", PowerShell 快速完成端口转发 netsh interface portproxy add v4tov4 ` listenaddress=0.0.0.0 ` listenport=2375 ` connectaddress=127.0.0.1 ` connectport=2375 查端口占用 杀进程 netstat -aon | findstr :8080 taskkill /PID 39656 /F 自定义常用命令别名 notepad $PROFILE function gacp { param ( [string]$msg = "update" ) git add . git commit -m $msg git push } # 删除当前文件夹下空文件夹 function rme { Get-ChildItem -Directory -Recurse | Where-Object { $_.GetFileSystemInfos().Count -eq 0 } | Remove-Item } Linux Linux开辟虚拟内存(Swap) free -h Linux实现FRP内网穿透 的是让国内用户能连到一台没有公网 IP 的家庭电脑——用的是反向内网穿透: ...

2025-08-24 10:51:14 PM · 9 分钟

SCA 2023.X — Nacos Bootstrap 配置失效问题排查与解决方案

Issue 来源:spring-cloud-alibaba#3931 影响版本:spring-cloud-alibaba 2023.0.1.3+ 一、问题描述 在 Spring Cloud Alibaba 2023.X 版本中,将 Nacos 配置(包括 extension-configs、shared-configs 等)放在 bootstrap.yml / bootstrap.properties 中,配置中心的内容无法正常加载,但日志显示 bootstrap 文件本身已被读取。 将相同配置移到 application.yml 后,一切恢复正常。 二、根本原因 flowchart TD A[bootstrap.yml 被读取] --> B{SCA 版本判断} B -- 2023.0.1.2 及以前 --> C[✅ 正常加载 Nacos 配置中心] B -- 2023.0.1.3 及以后 --> D[❌ extension-configs / shared-configs 失效] D --> E[问题根源:SCA 2023.0.1.3 修改了配置加载优先级机制] E --> F[bootstrap 阶段注册的 Nacos PropertySource 被后续流程覆盖或丢弃] 简单来说: SCA 2023.0.1.3 做了一次不向后兼容的内部变更,导致 bootstrap.yml 中的 Nacos 扩展配置在加载链路中被"丢掉",而 application.yml 中的配置走的是新路径,不受影响。 ...

2025-07-24 10:40:26 PM · 2 分钟

Nacos 一些常用配置 更新中 

bootstrap 配置 bootstrap.yaml server: port: 10888 tomcat: uri-encoding: UTF-8 spring: profiles: active: dev application: name: archive-service cloud: nacos: config: file-extension: yaml shared-configs: - data-id: shared-spring.yaml refresh: false - data-id: shared-redis.yaml refresh: false - data-id: shared-mybatis.yaml refresh: false - data-id: shared-logs.yaml refresh: false - data-id: shared-feign.yaml refresh: false - data-id: shared-logs.yaml # 共享日志配置 refresh: false # - data-id: shared-feign.yaml # 共享feign配置 # refresh: false lia: jdbc: database: tb_archive bootstrap-dev.yaml spring: cloud: nacos: server-addr: 192.168.2.115:8848 # nacos注册中心 discovery: namespace: f923fb34-cb0a-4c06-8fca-ad61ea61a3f0 group: DEFAULT_GROUP ip: 192.168.2.115 logging: level: asia.liminality: debug nacos 配置 shared-spring.yaml spring: jackson: default-property-inclusion: non_null main: allow-bean-definition-overriding: true mvc: pathmatch: #解决异常:swagger Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException #因为Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher matching-strategy: ant_path_matcher shared-redis.yaml spring: redis: host: ${lia.redis.host:192.168.2.115} password: ${lia.redis.password:github} lettuce: pool: max-active: ${lia.redis.pool.max-active:8} max-idle: ${lia.redis.pool.max-idle:8} min-idle: ${lia.redis.pool.min-idle:1} max-wait: ${lia.redis.pool.max-wait:300} shared-mybatis.yaml mySQL spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://${sh.jdbc.host:127.0.0.1}/${sh.jdbc.database}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false username: ${lia.jdbc.username:root} password: ${lia.jdbc.password:794211} mybatis-plus: configuration: default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler global-config: db-config: logic-delete-field: deletedAt logic-not-delete-value: "null" logic-delete-value: "now()" id-type: assign_id insert-strategy: not_null update-strategy: not_null porstgreSQL spring: datasource: driver-class-name: org.postgresql.Driver url: jdbc:postgresql://${lia.jdbc.host:192.168.2.115}:${lia.jdbc.port:5432}/${lia.jdbc.database}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai username: ${lia.jdbc.username:postgres} password: ${lia.jdbc.password:github} mybatis-plus: configuration: default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler global-config: db-config: logic-delete-field: deletedAt logic-not-delete-value: "null" logic-delete-value: "now()" id-type: assign_id insert-strategy: ignored update-strategy: ignored select-strategy: not_null shared-logs.yaml logging: pattern: dateformat: HH:mm:ss.SSS console: "%clr(%d{${LOG_DATEFORMAT_PATTERN}}){faint}-[${hostname}][%X{requestId:-sys}] %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n" file: "%d{${LOG_DATEFORMAT_PATTERN}}-[${hostname}][%X{requestId:-sys}]-${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%15.15t] %-40.40logger{39} : %m%n" file: path: "logs/${spring.application.name}" shared-feign.yaml feign: client: config: default: # default全局的配置 loggerLevel: BASIC # 日志级别,BASIC就是基本的请求和响应信息 httpclient: enabled: true # 开启feign对HttpClient的支持 max-connections: 200 # 最大的连接数 max-connections-per-route: 50 # 每个路径的最大连接数 sentinel: enabled: true

2025-06-24 07:01:02 PM · 2 分钟