Skip to content

Instantly share code, notes, and snippets.

@adgadev
Created August 26, 2022 21:05
Show Gist options
  • Save adgadev/5d34f1605ec708185bebbc7577ac063a to your computer and use it in GitHub Desktop.
Save adgadev/5d34f1605ec708185bebbc7577ac063a to your computer and use it in GitHub Desktop.
class HaloProfileCondition implements Condition {
private static final Profiles HALO_PROFILE = Profiles.of("halo");
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
return context.getEnvironment().acceptsProfiles(HALO_PROFILE);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment