Spring Cloud 服務發布:Angel.SR3

發布 | Dave Syer | 2015 年 6 月 26 日 | ...

Spring Cloud 的最新版本是 "Angel.SR3",現在可以從常用的儲存庫取得 (請注意新的命名慣例,詳情如下)。大多數組件現在都是 1.0.2.RELEASE,但 spring-cloud-netflix 是 1.0.3.RELEASE。 starters 和 cli 也都是 1.0.3.RELEASE,反映了它們對 Netflix 的依賴。 Angel.SR3 是 Angel.SR2(以前稱為 1.0.2)的錯誤修復版本,建議所有現有專案升級以利用。

有一些新功能,其中最大的是 starter 父專案的新命名慣例(見下文)。重點包括

  • 支援 git 標籤中的斜線(透過 HTTP 資源路徑中的特殊字元序列)

  • Config Server 啟動時的可選 git 初始化

  • Config clients 的其他選項,可自行處理解密,包括解密 bootstrap.yml 中的屬性的能力。

  • 針對新的 RSA 和 AES 演算法的其他密碼學組態選項

  • 金鑰輪換的策略,具有 TextEncryptorLocator 策略,使用者可以實作以動態查閱金鑰。

發布列車

Spring Cloud 是一個傘式專案,由獨立專案組成,原則上具有不同的發布週期。為了管理 portfolio,發布了一個 BOM (物料清單),其中包含 individual 專案上 curated 的相依性集合 (見下文)。發布列車具有名稱,而不是版本,以避免與子專案混淆。這些名稱是字母順序 (因此您可以按時間順序對它們進行排序),並使用倫敦地鐵站的名稱 ("Angel" 是第一個版本,"Brixton" 是第二個版本)。當 individual 專案的點發布累積到 critical mass,或者其中一個專案中存在需要提供給每個人的 critical bug 時,發布列車將推出以 ".SRX" 結尾的 "service releases",其中 "X" 是一個數字。

發布列車是此發布版 (Angel.SR3) 中的新事物,但較舊的發布版已重新發布 (相同的 artifact,不同的版本) 為 "Angel,[RELEASE,SR1,SR2]",分別對應於 1.0.0、1.0.1、1.0.2。發布列車標籤實際上僅在一個 artifact 中明確使用:"spring-cloud-starter-parent" (所有其他 artifact 都有與其父專案關聯的正常 "Spring" 發布標籤)。 starter 父專案是可以作為相依性管理 BOM 或作為父 POM (僅限 Maven) 使用的專案。使用最新版本以及 config client 和 eureka 的範例 (變更 artifact id 以提取其他 starters),使用具有父 POM 的 Maven

<parent>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-parent</artifactId>
  <version>Angel.SR3</version>
</parent>
<dependencies>
  <dependency>
    <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-config</artifactId>
  </dependency>
  <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-eureka</artifactId>
  </dependency>
  ...
</dependencies>

或作為 BOM (僅限相依性管理)

<dependencyManagement>
  <dependencies>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-parent</artifactId>
    <version>Angel.SR3</version>
    <type>pom</type>
    <scope>import</scope>
  </dependencies>
</dependencyManagement>
<dependencies>
  <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-config</artifactId>
  </dependency>
  <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-eureka</artifactId>
  </dependency>
  ...
</dependencies>

或使用 gradle

buildscript {
  dependencies {
    classpath "io.spring.gradle:dependency-management-plugin:0.4.0.RELEASE"
  }
}

apply plugin: "io.spring.dependency-management"

dependencyManagement {
  imports {
    mavenBom 'org.springframework.cloud:spring-cloud:Angel.SR3'
  }
}

dependencies {
    compile 'org.springframework.cloud:spring-cloud-starter-config'
    compile 'org.springframework.cloud:spring-cloud-starter-eureka'
    ...
}

SpringOne 2015

我將在今年於華盛頓特區舉行的 SpringOne 上談論 Spring Cloud。我很樂意在那裡見到你。

折扣

早鳥價格(6 月 13 日 - 8 月 14 日)可享 $150 美元的折扣。註冊 4 人即可獲得第 5 張通行證免費。請與我們聯繫,提供您前 4 位註冊者的姓名,以取得您的免費通行證代碼(僅限會議入場)。校友,請與我們聯繫以取得您的折扣代碼(任何選項均可享受 $150 美元的折扣)。

獲取 Spring 電子報

與 Spring 電子報保持聯繫

訂閱

搶先一步

VMware 提供培訓和認證,以加速您的進度。

了解更多

獲得支持

Tanzu Spring 在一個簡單的訂閱中提供對 OpenJDK™、Spring 和 Apache Tomcat® 的支持和二進位檔案。

了解更多

即將舉行的活動

查看 Spring 社群中所有即將舉行的活動。

查看所有