• 请不要在回答技术问题时复制粘贴 AI 生成的内容
rizon
V2EX  ›  程序员

spring ConditionalOnExpression 怎么匹配数组中是否包含某个值

  •  
  •   rizon ·
    othorizon · Oct 14, 2019 · 2331 views
    This topic created in 2588 days ago, the information mentioned may be changed or developed.

    如题 spring ConditionalOnExpression 怎么匹配数组中是否包含某个值 或者使用其它方式来检查也行啊

    3 replies  •  2019-10-14 17:21:08 +08:00
    rizon
    rizon
    OP
    Oct 14, 2019
    1
    没人知道吗?
    JQZhang
    JQZhang
    Oct 14, 2019
    2
    你试试这样"{'a','b'}.?[#this eq 'b'] ne {}",前边{'a','b'}是数组,'b'是你要匹配的值
    THESDZ
    THESDZ
    Oct 14, 2019
    3
    使用 @Conditional impl Condtion 方法
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1762 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 15:48 · PVG 23:48 · LAX 07:48 · JFK 10:48
    ♥ Do have faith in what you're doing.