Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ for non Spring beans

All,

Is it possible to define Aspect classes that would work on non spring beans? Meaning, that are not defined or managed as spring beans. I could make it working only with spring defined beans. For example, following definition works as it is a spring bean.

@Before("execution(* com.sample.service.MyLocalService.getName(..))")

However, following does not work as it is defined on a Util class that is not managed by spring as a bean.

@Before("execution(* com.sample.common.AuthUtil.isAllowed(..))")

I am trying to understand the behavior as I am trying to write some aspect classes to work on spring, hibernate and/or jdk classes.

Thanks in advance


Back to the top