title: Override/disable Aspect on runtime
body: <p>In my spring-boot application I have a dependency on external jar, which contains a class marked with annotation, on which @Aspect from this jar is being triggered.</p>
  
  <p>I have dao method annotated with mu custom annotation:</p>
  
  <pre><code>@MyAnnotation
  public void save(MyEntity entity)
  {
     super.save(entity);
  }
  </code></pre>
  
  <p>I have an aspect, which has an advice, sending message after save() method is called:</p>
  
  <pre><code>@Aspect
  public class MySuperAspect
  {
    @Autowired
    MessageSender messageSender;
  
    @Around("@annotation(MyAnnotation) &amp;&amp; args(entity)")
    public void sendMessage(MyEntity entity)
    {
       messageSender.send();
    }
  }
  </code></pre>
  
  <p>I do need Dao method from the jar, but I want to disable aspect for it.</p>
  
  <p>Aspect is being created via Spring XML configuration, which is inside the jar I use as well.</p>
  
  <p>I could modify the aspect itself, but it's undesirable as it's being used not only by my spring-boot app.</p>
  
  <p>I tried:</p>
  
  <ul>
  <li>Disabling xml configuration from scanning in my spring-boot app; </li>
  <li>Changing xml config to annotations and filter it in scanning;</li>
  <li>Adding @ConditionalOnExpression and @ConditionalOnProperty on aspect to be disabled by property;</li>
  </ul>
  
  <p>As of now the only way which works is adding @Value annotation with property by which I may control logic inside the advice, but I'm curious is this the only way to do that or probably I'm missing something?</p>