1

I have added the line <context:load-time-weaver/> to my application-context.xml,

and have created a META-INF\aop.xml file with the following:

<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
<aspectj>

    <weaver options="-verbose">
        <!-- only weave classes in our application-specific packages -->
        <include within="com.xxx.aspectj.*"/>
    </weaver>

    <aspects>
        <aspect name="com.xxx.aspectj.StandardAspect"/>
    </aspects>

</aspectj>

With the aspect including a catch-all to simply see if it is even working:

@After("call (public * *(..))")
public void interceptEverything() {
    System.out.println("Hello");
}

But nothing seems to happen, any ideas?

jhwang
  • 43
  • 7

1 Answers1

0

Removing the include within tag solved my problem.

I realized that I have misinterpreted the include within tag, I thought it had meant only weave aspects in the package listed, but it meant only weave aspects into classes in the package listed.

jhwang
  • 43
  • 7