Class SpringProfileActivationStrategy

  • All Implemented Interfaces:
    ActivationStrategy

    public class SpringProfileActivationStrategy
    extends AbstractTokenizedActivationStrategy

    An activation strategy based on the profiles that are active within the Spring environment.

    One or more profiles can be specified in a comma-separated value via the ""profiles"" parameter. This strategy works by only activating the feature if at least one of the profiles are currently active. Profile names are not case sensitive.

    If a given profile is prefixed with the NOT operator (!), the feature will only be active if the profile is not active. If the value of the ""profiles"" parameter was "p1,!p2", the feature would only be active if "p1" is active or if "p2" is not active.

    Author:
    Alasdair Mercer
    See Also:
    AbstractTokenizedActivationStrategy