我正在尝试检查 EnabledIf
是否存在多个系统属性。
当我对单个系统属性进行操作时,它似乎有效。
@EnabledIf(expression = "#{systemProperties['some'] != null}")
但是我对多个系统属性失败了。
@EnabledIf(expression = "#{systemProperties['some'] != null} and " +
"#{systemProperties['other'] != null}")
我怎样才能做到这一点?
最佳答案
和
需要位于表达式内:
@EnabledIf("#{systemProperties['some'] != null and "
+ "systemProperties['other'] != null}")
关于spring-el - 如何为多个系统属性执行多个逻辑结束?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57391226/