Spring 3.1 M1: 引入 FeatureSpecification 支援
更新:本文件中描述的 FeatureSpecification 功能已在 Spring Framework 3.1 M2 中移除,轉而支援 @Enable* 註解。更多資訊請參閱 3.1 M2 公告。
介紹
在本系列 先前 的 幾篇 博文 中,我簡要介紹了新的 @Profile 註解如何與 @Configuration 類結合使用,以利用 Spring 的 Bean 定義配置檔案。今天,我們將探討 Spring 3.1 中程式碼配置方面的全新功能:FeatureSpecification 類及其相關支援。
我準備了一個示例專案來配合本文。請訪問 https://github.com/cbeams/spring-3.1-featurespec,並遵循 README 中的說明…