How to create an aspect on class, that is not a bean using Spring AOP?
Posted
by Ula Krukar
on Stack Overflow
See other posts from Stack Overflow
or by Ula Krukar
Published on 2010-03-18T13:13:07Z
Indexed on
2010/03/18
17:11 UTC
Read the original article
Hit count: 370
Hello,
I work on an legacy application, where Spring AOP (namely ProxyFactoryBean
) is used.
I need to add an aspect around a method of a certain class. This class is not a bean however.
The AspecjJ pointcut expression would be like this:
execution(* xyz.package.Class.method())
I created a MethodInterceptor
and AspectJExpressionPointcut
, but I don't know how make those two work together.
EDIT:
I do not have source code for this class, it is a 3rd party library. The instances of this class are not created by me, neither in source code, nor in spring configuration as beans. It is used internally by the library.
Any help appreciated.
© Stack Overflow or respective owner