@FunctionalInterface public interface Profiles
May be implemented directly or, more usually, created using the
of(...) factory method.
|Modifier and Type||Method and Description|
Test if this
Create a new
Profilesinstance matches against the given active profiles predicate.
activeProfiles- predicate that tests whether a given profile is currently active
Profilesinstance that checks for matches against the given profile strings.
The returned instance will match if any one of the given profile strings matches.
A profile string may contain a simple profile name (for example
"production") or a profile expression. A profile expression allows
for more complicated profile logic to be expressed, for example
"production & cloud".
The following operators are supported in profile expressions:
!- A logical not of the profile
&- A logical and of the profiles
|- A logical or of the profiles
Please note that the
| operators may not be mixed
without using parentheses. For example
"a & b | c" is not a valid
expression; it must be expressed as
"(a & b) | c" or
"a & (b | c)".
profiles- the profile strings to include