[英]Boolean expression using Spring Profiles
We have the following annotation for a Component in a project: 我们对项目中的Component有以下注释:
@Profile("!department")
This means run this component when department is not an active profile. 这意味着当部门不是活动配置文件时运行此组件。 However, can you do something like:
但是,你可以这样做:
@Profile("!department" || "datamigration" )
OR @Profile("!department" || "datamigration" )
或
@Profile(["!department","datamigration"] )
Basically I want a way to be able to say, use this Component
if: 基本上我想要一种方法可以说,如果出现以下情况,请使用此
Component
:
这应该足够了
@Profile({"!department","datamigration"})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.