From 00ef5cf0c1ecce3c3eac0ced589648997b687539 Mon Sep 17 00:00:00 2001 From: chenxing Date: Thu, 13 Aug 2026 12:22:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=20Nacos=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=8E=20bootstrap=20=E4=BE=9D=E8=B5=96=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=20bootstrap.yml=20=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 缺少 spring-cloud-starter-alibaba-nacos-config 与 spring-cloud-starter-bootstrap 时, bootstrap.yml 在 Boot 2.7/Spring Cloud 2021.x 下被忽略,Nacos 共享配置 (application-infra.yaml 的 mysql 配置)不加载,应用回退 jar 内 localhost:3306 而连接被拒。 --- pom.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pom.xml b/pom.xml index 4db4d65..7225de0 100644 --- a/pom.xml +++ b/pom.xml @@ -46,6 +46,19 @@ org.springframework.boot spring-boot-starter-data-jpa + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + 3.1.8 + + org.springframework.boot spring-boot-starter-web