Does Spring AOP do compile time weaving or load time weaving?
An update who is reading this in 2019 and probably later:
In spring 5.x aspectjweaver.jar
was removed as a dependency and there is a need to include it separately if you want to use @AspectJ style annotations (or use Spring Boot for example).
- Spring 5.x POM (doesn't include)
- Spring 4.x POM (does include)
Weaving principles stay the same though - documentation
http://docs.spring.io/spring/docs/4.0.1.RELEASE/spring-framework-reference/htmlsingle/#aop-introduction-defn
Under 8.1.1, item weaving, it says:
Weaving: linking aspects with other application types or objects to create an advised object. This can be done at compile time (using the AspectJ compiler, for example), load time, or at runtime. Spring AOP, like other pure Java AOP frameworks, performs weaving at runtime.
Spring doesn't do the same type of load-time weaving as AspectJ, but works on proxies, as described in another part of the documentation:
http://docs.spring.io/spring/docs/4.0.1.RELEASE/spring-framework-reference/htmlsingle/#aop-understanding-aop-proxies
Edit: Just saw your comment, you are correct in that assumption. The documentation gives a rather complete explanation of how it works exactly. :)