之前學習consul注冊中心的時候就遇到版本問題,這次學習nacos的時候又遇到版本問題,可惜沒長記性,排查了一天最后才發現是boot和cloud的版本有問題。
記錄一下,防止以后再出現這種浪費時間的事,
解決方法:
我使用的springBoot是2.1.7.RELEASE的 對應的springcloud應該選擇 Greenwich.SR2 配置如下:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.SR2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>