I am new to AOP and have been trying for a while to get this working so any help would be...well, helpful.
I have a domain object which I have annotated with @Configurable.
I have included this domain object in the spring-beans file and set the scope to prototype. I have also been foreced to make it abstract=true, otherwise I get an error that the class could not be constructed (as there is no no-arg constructor) .
My Spring beans file includes the XML <context:spring-configured/>
I have a aop.xml file in META-INF with the following options
I have put the following plugin into my Maven POM
<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN"
<weaver options="-verbose -Xset:weaveJavaxPackages=true">
And I have set up a test case - which I run with the param : -javaagent:c:/tmp/aspectjweaver-1.6.8.jar
<!-- use this goal to weave all your main classes -->
<!-- use this goal to weave all your test classes -->
When I run my test I am able to step through the code and see that AspectJ does indeed intercept my construcuted object, and it does inject the correct property into the object.
Unfortunately it fails on BeanConfigurerSupport.checkExposedObject The error message is:
Can anyone please help me? I really really want to get this working and I'm so close....
Post-processor tried to replace bean instance of type [x.y.z.StructureStorageImpl] with (proxy) object of type [$Proxy31] - not supported for aspect-configured classes!