Skip to content

Instantly share code, notes, and snippets.

@malinduDeAlwis90
Created March 5, 2023 14:55
Show Gist options
  • Save malinduDeAlwis90/c8ffbefc1668e488fa8a714b0f4bc6f1 to your computer and use it in GitHub Desktop.
Save malinduDeAlwis90/c8ffbefc1668e488fa8a714b0f4bc6f1 to your computer and use it in GitHub Desktop.
package com.example.springconditionalbeans;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
public class CloudCondition implements Condition {
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
return true; // implement the logic here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment