@@ -533,6 +533,11 @@ standard AspectJ. The following example shows the `aop.xml` file:
533533 </aspectj>
534534----
535535
536+ NOTE: It is recommended to only weave specific classes (typically those in the
537+ application packages, as shown in the `aop.xml` example above) in order
538+ to avoid side effects such as AspectJ dump files and warnings.
539+ This is also a best practice from an efficiency perspective.
540+
536541Now we can move on to the Spring-specific portion of the configuration. We need
537542to configure a `LoadTimeWeaver` (explained later). This load-time weaver is the
538543essential component responsible for weaving the aspect configuration in one or
@@ -714,10 +719,29 @@ Furthermore, the compiled aspect classes need to be available on the classpath.
714719
715720
716721[[aop-aj-ltw-aop_dot_xml]]
717- === ' META-INF/aop.xml'
722+ === ` META-INF/aop.xml`
718723
719724The AspectJ LTW infrastructure is configured by using one or more `META-INF/aop.xml`
720725files that are on the Java classpath (either directly or, more typically, in jar files).
726+ For example:
727+
728+ [source,xml,indent=0,subs="verbatim"]
729+ ----
730+ <!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "https://www.eclipse.org/aspectj/dtd/aspectj.dtd">
731+ <aspectj>
732+
733+ <weaver>
734+ <!-- only weave classes in our application-specific packages -->
735+ <include within="com.xyz.*"/>
736+ </weaver>
737+
738+ </aspectj>
739+ ----
740+
741+ NOTE: It is recommended to only weave specific classes (typically those in the
742+ application packages, as shown in the `aop.xml` example above) in order
743+ to avoid side effects such as AspectJ dump files and warnings.
744+ This is also a best practice from an efficiency perspective.
721745
722746The structure and contents of this file is detailed in the LTW part of the
723747{aspectj-docs-devguide}/ltw-configuration.html[AspectJ reference
0 commit comments