Jun 12th, 2012, 06:08 PM
Weaving Spring AOP aspect on jar class method execution
I am using Spring AOP to weave my Aspect around method execution of a jar's class.
Problem is pointcut execution is not intercepted.
Writing AspectJ aspect is not an option as the Aspect is in Spring AOP, and has been provided by company's framework team.
My question is :
Is it possible with Spring AOP?
If so, please guide how.
I have wondered across threads, but haven't got a solution.
Thanks in advance.
Jun 13th, 2012, 01:09 AM
Spring will only apply AOP to beans in the application context it will not apply AOP to beans which aren't under its control. So external classes from jar files will not be adviced. The only way to do so is to use AspectJ and use loadtime weaving.