title: Spring Boot - Compile time weaving and Spring AOP/run time weaving (proxies) in same project
body: <p>What does Spring Boot do in the event that there is code to use both Spring AOP with run time weaving/use of proxies and compile time weaving in the same project. For example, say you have an aspect that looks like this:</p>
  <pre class="lang-java prettyprint-override"><code>@Aspect
  @Component
  public class TestAspect {
    // ...
  }
  </code></pre>
  <p>where the existence of @Component would imply that we are using Spring AOP and proxies, and you have this in your pom.xml</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
    &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
    &lt;artifactId&gt;aspectj-maven-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.11&lt;/version&gt;
    &lt;executions&gt;
      &lt;execution&gt;
        &lt;goals&gt;
          &lt;goal&gt;compile&lt;/goal&gt;       &lt;!-- use this goal to weave all your main classes --&gt;
          &lt;goal&gt;test-compile&lt;/goal&gt;  &lt;!-- use this goal to weave all your test classes --&gt;
        &lt;/goals&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  <p>which would imply we are using compile time weaving.</p>
  <p>Which one takes precedence? Is compile time weaving used, or proxies?</p>