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

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

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

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

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