Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This annotation allows to activate beans based on expressions. Out-of-the-box simple conditions are supported. The values will be resolved from the environment via the default resolvers (see out-of-the-box environment-config options) or via a custom resolver ConfiguredValueResolver which allows to use any type of configuration-format. An easy way to configure it permanently is e.g. myfaces-extcdi.properties or for more dynamic use-cases, it's possible to use system-properties.

Code Block
java
java
titleAlternative implementation activated based on a configured value
@ExpressionActivated("db==dev-db")
public class TestDataCreator
{
  //...
}

or

@ExpressionActivated("db!=prod-db;db==*")
public class TestDataCreator
{
  //...
}

...