1

我正在尝试检查是否存在多个系统属性EnabledIf

当我做一个单一的系统属性时,它似乎工作。

@EnabledIf(expression = "#{systemProperties['some'] != null}")

但我因多个系统属性而失败。

@EnabledIf(expression = "#{systemProperties['some'] != null} and " +
                        "#{systemProperties['other'] != null}")

我怎样才能做到这一点?

4

1 回答 1

2

and需要在表达式内:

@EnabledIf("#{systemProperties['some'] != null and "
           + "systemProperties['other'] != null}")
于 2019-08-07T15:34:17.603 回答