簡體   English   中英

使用Spring Profiles的布爾表達式

[英]Boolean expression using Spring Profiles

我們對項目中的Component有以下注釋:

@Profile("!department")

這意味着當部門不是活動配置文件時運行此組件。 但是,你可以這樣做:

@Profile("!department" || "datamigration" )

 @Profile(["!department","datamigration"] )

基本上我想要一種方法可以說,如果出現以下情況,請使用此Component

  • 個人資料不是部門
    • 要么
  • 個人資料是數據遷移

這應該足夠了

@Profile({"!department","datamigration"})

使用 '

[英]Using '<import resource=' on multiple beans profiles in spring?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM