In order to ship @Aspect classes for usage with Spring AOP proxies as well as AspectJ load-time and compile-time weaving, they need to be fully compiled with ajc. This is the case for Micrometer's TimedAspect: https://github.com/micrometer-metrics/micrometer/issues/1149
Our isAspect() check in AbstractAspectJAdvisorFactory does not accept ajc-compiled classes since it assumes that those are classic aspect classes which are not suitable for usage with Spring AOP. Let's relax that check, we only really need isAspect() to tell us what we need to introspect; we do not need it to determine actual advice compatibility.
In order to ship
@Aspect
classes for usage with Spring AOP proxies as well as AspectJ load-time and compile-time weaving, they need to be fully compiled with ajc. This is the case for Micrometer'sTimedAspect
: https://github.com/micrometer-metrics/micrometer/issues/1149Our
isAspect()
check inAbstractAspectJAdvisorFactory
does not accept ajc-compiled classes since it assumes that those are classic aspect classes which are not suitable for usage with Spring AOP. Let's relax that check, we only really needisAspect()
to tell us what we need to introspect; we do not need it to determine actual advice compatibility.