一、版本升级
spring-boot-2.2.13.RELEASE 升级 2.6.6
<properties>...<spring.boot.version>2.6.6</spring.boot.version><spring-cloud.version>2021.0.1</spring-cloud.version><spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version>...</properties>
...<dependencyManagement><dependencies>...<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${spring.boot.version}</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>${spring-cloud.version}</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>${spring-cloud-alibaba.version}</version><type>pom</type><scope>import</scope></dependency>...</dependencies></dependencyManagement>
二、nacos配置依赖
旧依赖
<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency>
新依赖
<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-bootstrap</artifactId></dependency><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency>
三、配置 bootstrap.properties 变更
旧配置
spring.cloud.nacos.config.ext-config[0].data-id=...
spring.cloud.nacos.config.ext-config[0].group=...
新配置
spring.cloud.nacos.config.extension-configs[0].data-id=...
spring.cloud.nacos.config.extension-configs[0].group=...
四、新增配置
在 bootstrap.properties 中新增如下配置
spring.cloud.bootstrap.enabled=true
五、其它
略