Spring @Conditional based on a value in database table
问题 Condition evaluation depends on a value provided in data base table @Component public class XYZCondition implements Condition{ @Override public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { //based on value defined in DB should return true/false } } As Condition is executing very early, unable to fetch db value is there any alternate way to achieve this ? 回答1: Database values can be changed during application work, while it doesn't seem a good idea to reload