一、版本升级
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 中新增如下配置文章来源:https://www.toymoban.com/news/detail-564623.html
spring.cloud.bootstrap.enabled=true
五、其它
略文章来源地址https://www.toymoban.com/news/detail-564623.html
到了这里,关于spring-boot-2.2.13.RELEASE 升级 2.6.6 记录的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!