I would like to do something as the following to conditional load a bean:
@Conditional(OnAuthoritieCondition.class, "SOME_INPUT_STRING")
However when I try to implement this I get the following:
public class OnAuthoritieCondition implements Condition {
@Override
public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
return false;
}
}
Now my question is how can I implement a custom condition that takes parameters or is there a better way to do what I want?