Yes, I should have demonstrated that. I recommended using them for performance but didn't include it as a sample.
For reference we can do something like this:
publicclassDebugConditionimplementsCondition{@Overridepublicbooleanmatches(ConditionContextcontext,AnnotatedTypeMetadatametadata){// Check if a "debug" profile is activereturncontext.getEnvironment().acceptsProfiles("debug");}}
Maybe you can add the use of @Conditional in the aspect class as a mechanism to activate and desactivate the aspects.
Yes, I should have demonstrated that. I recommended using them for performance but didn't include it as a sample.
For reference we can do something like this:
We can then do:
Which will show the aspect only in debug mode.