Skip to Content
持續交付|使用Java
book

持續交付|使用Java

by Daniel Bryant, Abraham Marín-Pérez
July 2019
Intermediate to advanced
480 pages
9h 35m
Chinese
GoTop Information, Inc.
Content preview from 持續交付|使用Java
從管道部署與釋出 |
283
- test-featureflags-db
environment:
- spring.profiles.active=test
最後一個元素
environment
將環境變數
spring.profiles.active
設為
test
,這會覆寫
application.properties
檔案內的設定,並且會要求 Spring Boot 在啟動與設置 Feature
Flags 服務時使用
application-test.properties
檔。藉此,你可以在使用 baked-in 組態模式
的同時,為不同的環境維護不同的組態組合。
外部化組態
使用 baked-in 組態有一個後果,因為你將它視為另一個程式碼檔案(或一組檔案)來
追蹤,所以你對組態做的任何更改都會被組建管道當成程式碼的更改。這種情況有時是
有幫助的,因為組態的變動或許需要測試,但是在其他情況下,它只會觸發沒必要的工
作:例如,當你更改測試環境的旗標時,它不但會觸發整組設定,也會為了完全不影響
生產環境的東西,而對生產環境進行新的部署。
baked-in 組態還有一項缺點:因為它被當成程式碼存放區的另一個檔案來管理,所以只
有開發者可以更改它。有些組態選項可能適合這種做法(例如資料庫連結的連接池參
數),但有時你想要把這個權力授與組織的其他成員。例如,在管理功能旗標時,你可
能想要讓商務人員決定何時與如何調整它們。另一個例子是,如果基礎設施團隊提供某
些資源讓 app 使用,例如 log 池(見第 13
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精實企業|高績效組織如何達成創新規模化

精實企業|高績效組織如何達成創新規模化

Jez Humble, Joanne Molesky, Barry O'Reilly
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
精通機器學習|使用Python

精通機器學習|使用Python

Sarah Guido, Andreas C. Mueller
数字化转型:企业破局的34 个锦囊

数字化转型:企业破局的34 个锦囊

Gary O’Brien, Xiao Guo, Mike Mason

Publisher Resources

ISBN: 9789865021740