spring-el - 如何为多个系统属性执行多个逻辑端?
问题描述
我正在尝试检查是否存在多个系统属性EnabledIf
。
当我做一个单一的系统属性时,它似乎工作。
@EnabledIf(expression = "#{systemProperties['some'] != null}")
但我因多个系统属性而失败。
@EnabledIf(expression = "#{systemProperties['some'] != null} and " +
"#{systemProperties['other'] != null}")
我怎样才能做到这一点?
解决方案
and
需要在表达式内:
@EnabledIf("#{systemProperties['some'] != null and "
+ "systemProperties['other'] != null}")
推荐阅读
- c# - Python 相当于 C# 的 SynchronizationContext
- css - 将组件定位在固定的 app.vue 之上
- angular - 在从服务器获取数据之前“无法读取未定义的属性‘名称’”
- graphql - 如何在不重新启动服务的情况下更新架构
- html - IE11 的 CSS 网格布局支持
- css - 按钮始终为正方形,高度可变
- android - 如何将粗体添加到自定义字体系列,然后将其用于字符串?
- tensorflow - CPU 和 GPU TensorFlow 安装
- binding - Aurelia:任何属性被修改时的通知
- laravel - Laravel,选择所有发布其第一个批准修订的帖子